rlogind / BRL Sys V problem

Tony Luck aegl at root44.UUCP
Wed Apr 23 22:54:50 AEST 1986


We run Berkeley 4.2 (with most of the Usenet/MtXinu bug fixes) together
with Doug Gwyn's system V emulation package on a VAX 11/750.
A problem arises with programs that fork children and then wait for them
(e.g. make, cc, ...) which are compiled with Doug's package and then run
from an rlogin connection on a pseudo-terminal.

/etc/rlogind ignores SIGCHLD before invoking /bin/login - thus all child
processes inherit this. The wait(2) library code in Doug's package checks
to see if you are ignoring SIGCHLD, if you are it waits for all children
and returns -1 with errno=ECHILD.

1) Why does /etc/rlogind leave SIGCHLD in SIG_IGN state when execl'ing
   /bin/login - this appears to be a simple oversight - but too many users
   here will want to break my arms if I just change it and then discover a
   good reason for this behaivour later!

2) Why does the "wait()" code check for SIGCHLD and then wait for all children
to die - this might be to try to emulate the "if a process ignores SIGCLD
then it's children won't turn into zombies when they die" mode of system V
(I thought you needed garlic+holy water for that!)

Any helpful hints will be gratefully received by mail to:
	...!mcvax!ukc!root44!aegl
I'll summarize anything remotely interesting back to the net.

P.S. If you have to port code written for Sys V to a 4.2 system then
Doug Gwyn's package is *excellent*. Apart from a few oddities with ioctls
that can't be mapped right and the above problem I've had no problems
worth mentioning with it.



More information about the Comp.unix.wizards mailing list