Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!its63b!xsimon From: xsimon@its63b.ed.ac.uk (Simon Brown) Newsgroups: comp.unix.questions Subject: Re: SIGUSR1, SIGUSR2 are pretty useless Message-ID: <462@its63b.ed.ac.uk> Date: Thu, 4-Jun-87 08:39:56 EDT Article-I.D.: its63b.462 Posted: Thu Jun 4 08:39:56 1987 Date-Received: Tue, 9-Jun-87 03:18:05 EDT References: <444@its63b.ed.ac.uk> <1179@ius2.cs.cmu.edu> Reply-To: xsimon@its63b.ed.ac.uk (Simon Brown) Organization: Computer Science Department, Edinburgh University Lines: 47 In article <1179@ius2.cs.cmu.edu> edw@ius2.cs.cmu.edu (Eddie Wyatt) writes: > >One, do you know about the system calls >signal and sigvec? As soon as you set up a handler then SIGUSR1 and >SIGUSR2, they have real meaning and usefulness. I'm not going to go into >all the things you can do. 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. b) Some not-very-vanilla System-V's have BSD sockets bolted on, with "#define SIGURG SIGUSR1" in . However, BSD's SIGURG is ignored if set to SIG_DFL, whereas this fake nasty SysV SIGURG (USR1) causes termination. This can be very embarassing in a process which has a socket open unknown to it (inherited from its parent) - it doesn't know it's got a socket open and so is in danger of getting a SIGURG, so it probably won't bother to trap SIGURG (ie, SIGUSR1). Of course, this isn't a very meaningful objection, since I shouldn't be using such a cruddy system in the first place, I suppose :-) c) There are only two of them, which isn't enough. > > Two, there are sychronous and asynchronous messages passing conventions. >What do you think the SIGURG is used for. There are limitations like the >number of bytes you may send out of band (asychronously) and you must do a >few strange things to enable interrupts to be generated on the socket but >the facility exist, at least in Berkley Unix. > I was talking 'bout System V, really, and the msgop IPC. But yes, I suppose SIGURG does the job for the Berkeley heap. > Eddie Wyatt >e-mail: edw@ius2.cs.cmu.edu -- ---------------------------------- | Simon Brown | UUCP: seismo!mcvax!ukc!{its63b,cstvax}!simon | Department of Computer Science | JANET: simon@uk.ac.ed.{its63b,cstvax} | University of Edinburgh, | ARPA: simon%{its63b,cstvax}.ed.ac.uk ... | Scotland, UK. | @cs.ucl.ac.uk ---------------------------------- "Life's like that, you know"