Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!amdcad!cae780!hplabs!hpcea!hpfcdc!rml From: rml@hpfcdc.UUCP Newsgroups: comp.unix.questions Subject: Re: Re: SIGUSR1, SIGUSR2 are pretty useless - (nf) Message-ID: <5740009@hpfcdc.HP.COM> Date: Mon, 8-Jun-87 19:50:19 EDT Article-I.D.: hpfcdc.5740009 Posted: Mon Jun 8 19:50:19 1987 Date-Received: Sat, 13-Jun-87 04:40:18 EDT References: <444@its63b.ed.ac.uk> Organization: HP Ft. Collins, Co. Lines: 33 > I think you have missed the entire point of what I was trying to say. Sure, > you can trap SIGUSR[12], but using them is dangerous and restrictive because: > a) They are "global" (like all signals), so there can be no > guarantee that some bastard process won't send them to a > process that is making some special use of them. This is > reasonable for signals which have a well-defined meaning, but > not for these. I don't understand why this is more reasonable for signals "with a well-defined meaning." If a program catches SIGALRM expecting it to indicate expiration of a timer and some "bastard process" sends it a SIGALRM, the program does the wrong thing. This doesn't seem very different from the situation with SIGUSR1. Besides, the program that doesn't catch SIGUSR1 and dies from the stray signal is probably no better off than the one that catches and misinterprets it. The point is that there should not be "bastard programs" floating around sending any unexpected potentially fatal signals to unsuspecting programs. Since the ability to send a signal is restricted by user ID, it seems you have only yourself or your system administrator to blame if they do exist. > b) Some not-very-vanilla System-V's have BSD sockets bolted on, with > "#define SIGURG SIGUSR1" in . This is indeed misuse of a "user-defined" signal. The IEEE 1003.1 standard is attempting to clarify this more by describing these signals as "reserved as application defined signal". > c) There are only two of them, which isn't enough. This is a limitation, but it doesn't quite make the feature useless. Bob Lenk {ihnp4, hplabs}!hpfcla!rml