Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!amdcad!lll-crg!gymble!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: 4.2BSD and Signals Message-ID: <2901@umcp-cs.UUCP> Date: Mon, 27-Jan-86 23:59:28 EST Article-I.D.: umcp-cs.2901 Posted: Mon Jan 27 23:59:28 1986 Date-Received: Thu, 30-Jan-86 01:05:12 EST References: <173@winston.UUCP> <174@winston.UUCP> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 22 > The man page for sig block says: > Signal i is blocked if the i-th bit in mask is a 1. > well, what they really want you to do is: ... sigblock(1 << (signun - 1)) There is no contradiction here. The first bit is bit 0; the 32nd bit is bit 31; and the i'th bit is bit i-1. I agree that the manual should be much more explicit. In 4.3, defines a macro called `sigmask' which should be used when creating signal masks: omask = sigblock(sigmask(SIGINT) | sigmask(SIGHUP)); ... (void) sigsetmask(omask); Note that there really should be a `signal mask' type, too; `int' enforces a maximum of 16 signals on some machines. Having a separate type name would allow more than 32 signals, too. Maybe in 4.4.... -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu