multiple signals per watcher

Marc Lehmann schmorp at schmorp.de
Tue Sep 30 20:36:22 CEST 2008


On Tue, Sep 30, 2008 at 02:06:00PM +0200, Alejandro Mery <amery at geeks.cl> wrote:
> I have an ev_signal watcher upon SIGTERM|SIGINT, but I just noticed ^C

What should SIGTERM|SIGINT be? OR'ing two signal numbers together does not
usually result in anything useful, and certainly is no magical way to store
two numbers in one number.

Since signal numbers are usually small integers, you could probably roll
your own bitfield, via 1U<<SIGINT etc., but that isn't portable either.

Since those symbols do not come from libev, this is also outside the scope
of libev - check your system dcoumentation on the values of the SIGxxx
symbols.

> is not been catched by this watcher, only SIGTERM... are "multiple"
> signals on the same watcher supported by libev?

The documentation seems absolutely clear to me - what part of the
ev_signal documentation did you find unclear and needs improvement?

> btw, the example
> <http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Examples-4> has
> a wrong _start() and SIGTERM is not mentioned.

Indeed, thanks!

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list