UNIX IPC

edhall at rand-unix edhall at rand-unix
Thu Sep 22 07:36:00 AEST 1983


Signals as implemented in V7 UNIX have too may quirks for IPC, as
I'm sure several messages will point out.  But 4.1BSD fixes (?)
the problem in its `jobs' library (see JOBS(3J) and SIGSYS(2J)) in
the Berkeley manual).  A mechanism is provided which allows further
signals to be defered after the first occurance, avoiding the
problem of V7's reset-to-default after signal.

The ability is also provided to hold (rather than simply ignore)
signals during critical sections.

That all this works is illustrated by CSH, which simply sits in
pause() and only calls wait() (actually wait3()) when it receives
a special SIGCHLD signal indicating a status change in a child
process.  Note that dropping a signal would hang the shell!  Much
of the signal mechanism was re-worked in 4.1BSD to provide job-
control.  I don't know if it has changed again with 4.2...

Compatability with the old signal scheme is provided by having a
per-process flag which is set only when any of the new stuff is
used.  (Smells like a kludge, no?)

		-Ed Hall
		edhall at rand-unix
		decvax!randvax!edhall



More information about the Comp.unix.wizards mailing list