Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.questions Subject: Re: SIGUSR1, SIGUSR2 are pretty useless Message-ID: <19926@sun.uucp> Date: Thu, 28-May-87 14:19:25 EDT Article-I.D.: sun.19926 Posted: Thu May 28 14:19:25 1987 Date-Received: Sat, 30-May-87 05:04:51 EDT References: <444@its63b.ed.ac.uk> Sender: news@sun.uucp Lines: 25 > It would seem that System V's "user definable" signals SIGUSR1 and SIGUSR2 And 4.3BSD's... > are really not so useful after all. A signal may only be safely sent to a > process if its "meaning" in the target process can be guarenteed. (eg, if > However, SIGUSR[12] have no such fixed purpose, so the only way it is > completely safe to use these is for a process to kill itself (or possibly > its children or its parent, if it can be sure they're executing from the > same image - havn't done an exec). Nope. Two processes can be running programs that agree on the meaning of SIGUSR1 or SIGUSR2. (No, the fact that one of those processes might do an "exec" isn't relevant - if they agree on the meaning of one of these signals, they should also agree not to "exec" any programs that don't also agree.) However, there is a problem with them that renders them dangerous to use on S5RN for N < 3; they're signals, which means that there is a window between the arrival of the signal and the call to "signal" inside the handler to set the action to SIG_IGN where the arrival of another such signal will kill the process. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com