[comp.sources.d] Jove pipeprocs

elg@killer.UUCP (09/27/87)

Has anybody managed to get Jove's pipeprocs to work with Sys V?

Since Sys V has pipes just like any other Unix, I fail to see what the heck
the problem is, besides converting the signal names from BSD to AT&T... alas,
I haven't the slightest idea what AT&T signal corresponds to what BSD signal
(I am NOT a Sys V expert).
--
Eric Green   elg@usl.CSNET     "... hanging on in quiet desperation
{cbosgd,ihnp4}!killer!elg          is the english way,
Snail Mail P.O. Box 92191          the time is gone, the song is over,
Lafayette, LA 70509                thought I'd something more to say....."

allbery@ncoast.UUCP (10/03/87)

As quoted from <1658@killer.UUCP> by elg@killer.UUCP (Eric Green):
+---------------
| Has anybody managed to get Jove's pipeprocs to work with Sys V?
| 
| Since Sys V has pipes just like any other Unix, I fail to see what the heck
| the problem is, besides converting the signal names from BSD to AT&T... alas,
| I haven't the slightest idea what AT&T signal corresponds to what BSD signal
| (I am NOT a Sys V expert).
+---------------

The problem is that in order to prevent what I would guess is a race condition
involving signals between the parent and child processes, iproc-pipes.c must
sigblock(SIGCHLD) after forking and then unblock it when its handlers are
set up for the new child process.  YOU CAN'T BLOCK SIGNALS (effectively, defer
them) UNDER SYSTEM V!  At least not under V.2; V.3.1 supposedly got some of the
original 4.1BSD version of signals.  Golly gee, V.4 might even have a rational
signal setup.

Of course, if it works to write a sigblock() which temporarily sets the handler
for the signal to a routine which bumps a counter, then at restore if the
counter is set we call the signal handler, then we can do this.  Since I have
the pty driver for SYstem V installed, I'd use iproc-ptys.c instead... then
again, I'm going whole-hog (GNU Emacs) anyway as soon as I can.
-- 
	    Brandon S. Allbery, moderator of comp.sources.misc
  {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery
ARPA: necntc!ncoast!allbery@harvard.harvard.edu  Fido: 157/502  MCI: BALLBERY
   <<ncoast Public Access UNIX: +1 216 781 6201 24hrs. 300/1200/2400 baud>>
"`You left off the thunderclap and the lightning flash.', I told him.
`Should I try again?'  `Never mind.'"     --Steven Brust, JHEREG