From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,65ffa68bedbf8f54 X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,65ffa68bedbf8f54 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-09-01 14:24:31 PST Xref: gmd.de comp.sys.dec:9843 comp.unix.osf.osf1:958 Path: gmd.de!xlink.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!bloom-beacon.mit.edu!paperboy.osf.org!surf.osf.org!tom From: tom@surf.osf.org (Tom Jordahl) Newsgroups: comp.sys.dec,comp.unix.osf.osf1 Subject: Re: DEC OSF/1 1.2 inetd and process groups. Date: 1 Sep 1993 21:02:54 GMT Organization: Open Software Foundation Message-ID: <2632lu$ct3@paperboy.osf.org> References: NNTP-Posting-Host: surf.osf.org Keywords: inetd osf/1 In article 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 /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