sh and sigtstp problem.

mark.umcp-cs at udel-relay mark.umcp-cs at udel-relay
Mon Aug 1 11:10:06 AEST 1983


From:  Mark Weiser <mark.umcp-cs at udel-relay>

I spent a few minutes looking at the csh background/foreground
(sh.proc.c) with which I was already familiar, and then the sh forking
code (exe.c), for which it was my first time (so my judgement may be more
subject to error here).   I didn't come up with a definitive answer, but looking
reminded me of two things going on when a SIGTSTP occurs in a
child with which the sh may be unprepared to deal.
	1.  There are lots of extra signals floating around,
SIGCHLD for instance.  It looks like this should not cause any
problems since it defaults to nothing, but the 'sh' of course
does nothing to prepare for it.
	2.  The csh (and wsh and other shell-like code using
process control) ordinarily hand over the control terminal to
the forground process, and then grab it back when something
happens to the foreground program.  Signals bouncing around
go to everyone in the same process group as the control terminal,
which will exclude the csh, but will include the sh (since it
did nothing to put anyone in any other process group since it
doesn't know about process groups).  This will aggravate the
problems of (1) since all the extra signals will truly by zipping
around.

Of course, this doesn't really explain things, but I promise I
won't say "if you would only use the csh...".



More information about the Comp.unix.wizards mailing list