Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: tom@surf.osf.org (Tom Jordahl)
Subject: Re: DEC OSF/1 1.2 inetd and process groups.
Date: 1 Sep 1993 21:02:54 GMT	[thread overview]
Message-ID: <2632lu$ct3@paperboy.osf.org> (raw)
In-Reply-To: anthony.746770417@eden-valley

In article <anthony.746770417@eden-valley> anthony@aaii.oz.au (Anthony Baxter) writes:
>
>Here's a fun one for you - under OSF/1 1.2 (and, it seems, 1.3) inetd doesnt
>make its child processes process group leaders. This has a few unfortunate
>side-effects. 
>
>"rsh machine script" as root, where 'script' contains 'kill -9 0' (which
>is useful to make sure you get rid of any leftover child processes) will
>kill the not only the script, any children, and the rshd, but also inetd,
>_and_ every child of inetd running (eg all rlogind's, rshd's, &c.) This is
>extremely nasty. It seems that OSF/1 1.3 has this problem also (from looking
>at axposf.pa.dec.com). For some reason 'inetd -d' (debugging mode) works 
>properly, making its children process group leaders. So the workaround we
>are using until the telephone support centre returns our call is
>'inetd -d >/dev/null 2>&1 &'.

[examples deleted]

>How to tell if you trip this bug? Well, for starters, all your logins over
>the network to the machine go away, and you cant log back in. :-)


On OSF/1 R1.2 (from OSF) I see the behavior you describe, but not the problem.

ps agxopid,ppid,pgid,args 
  PID  PPID  PGID COMMAND
10201 10213 10201 csh -c sleep 4000
10206     1 10206 inetd
10213 10206 10206 rshd
10218 10206 10206 rlogind
10219 10201 10201 sleep 4000
10222 10218 10222 -csh (csh)
10247 10206 10247 telnetd
10248 10247 10248 -csh (csh)


cat /foo
#!/sbin/sh
echo hi
kill -9 0

rsh <machine> /foo
hi

ps agxopid,ppid,pgid,args | grep inet
10206     1 10206 inetd

-------

Everything works as it should.

Notice that telnetd sets the Process group-id correctly.  Its
rlogind and rshd that seem not to be doing the 'right thing'.

Inetd will do a setsid() call if the -d switch is given to it 
(check the BSD source, which is where we got ours).  
Unless DEC changed what we gave them in 1.0.4 (quite possible!) the OSF/1
inetd is pretty much BSD4.3-reno code.


-- 
Tom Jordahl                                       Internet: tom@osf.org
Open Software Foundation                          UUCP:   ..!uunet!osf!tom
 "Sometimes when you fill a vacuum, it still sucks." - Dennis Ritchie on X


      reply	other threads:[~1993-09-01 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-31  4:13 DEC OSF/1 1.2 inetd and process groups Anthony Baxter
1993-09-01 21:02 ` Tom Jordahl [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox