Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!vector!rpp386!pigs!haugj From: haugj@pigs.UUCP (Joe Bob Willie) Newsgroups: comp.unix.xenix Subject: Re: Test SCO Xenix IPC reliability Summary: more scheduler troubles ... Message-ID: <377@pigs.UUCP> Date: 27 Aug 88 19:46:18 GMT References: <166@ispi.UUCP> <105@sdgsunsdgsun.com> Reply-To: haugj@pigs.UUCP (Joe Bob Willie) Organization: Big "D" Oil and Gas Lines: 22 In article <105@sdgsunsdgsun.com> lab@sdgsunsdgsun.com (Larry Baird) writes: >in article <166@ispi.UUCP>, jbayer@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@rpp386.dallas.tx.us Very Short Address: jfh@rpp386 "ANSI C: Just say no" -- Me