Test SCO Xenix IPC reliability

Joe Bob Willie haugj at pigs.UUCP
Sun Aug 28 05:46:18 AEST 1988


In article <105 at sdgsunsdgsun.com> lab at sdgsunsdgsun.com (Larry Baird) writes:
>in article <166 at ispi.UUCP>, jbayer at ispi.UUCP (id for use with uunet/usenet) says:
>An better fix is to move the setting of loc[0] 
>	(*loc = 1 and *loc = 0 )
>to after there respective kills.  
>The first kill from parent to child will be ignored, but the 
>kill from child to parent will sink up the whole process.

the original code didn't use signals.  unix signals can result in race
conditions since there is no atomic method to send a signal and wait for
the receipt of a signal with one system call.  so long as control returns
to the user between the kill() and the pause(), a race exists.

in this case, should the scheduler chose to execute the child immediately
after the parent (works either way, by the way) sets *loc = 1, the child
can go all the way around its loop and kill the parent before it gets a
chance to enter pause().
-- 
=-=-=-=-=-=-=-The Beach Bum at The Big "D" Home for Wayward Hackers-=-=-=-=-=-=
               Very Long Address: John.F.Haugh at rpp386.dallas.tx.us
                         Very Short Address: jfh at rpp386
                           "ANSI C: Just say no" -- Me



More information about the Comp.unix.xenix mailing list