Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!bionet!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: What do you want in a signal library? Message-ID: <11971@smoke.BRL.MIL> Date: 17 Jan 90 15:02:44 GMT References: <20926@stealth.acf.nyu.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 25 In article <20926@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: >On the same subject: How does one correctly code ANSI C raise() so as to >prevent race conditions? I want to make sure I'm not messing this up. /* raise() -- send a signal to the current process public-domain implementation last edit: 16-Jan-1990 Gwyn@BRL.MIL complies with the following standards: ANSI X3.159-1989 IEEE Std 1003.1-1988 SVID Issue 3 */ extern int getpid(), kill(); /* UNIX/POSIX system calls */ int raise(sig) int sig; { return kill(getpid(), sig); /* set errno to EINVAL if sig invalid */ }