Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdccsu3.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!ittvax!dcdwest!sdcsvax!sdccsu3!muller From: muller@sdccsu3.UUCP Newsgroups: net.unix-wizards Subject: 4.2 sigblock manual page is vague (wrong?) Message-ID: <1696@sdccsu3.UUCP> Date: Fri, 30-Mar-84 15:12:06 EST Article-I.D.: sdccsu3.1696 Posted: Fri Mar 30 15:12:06 1984 Date-Received: Sun, 1-Apr-84 08:41:52 EST Organization: U.C. San Diego, Computer Center Lines: 16 The manual page for sigblock states "Signal i is blocked if the i-th bit in mask is a 1". So I blindly (wrongly) assumed that the following code fragment would block SIGALRM (alarm 15): oldmask = sigblock(1 << SIGALRM); WRONG! That blocks SIGTERM (16) not SIGALRM (15). What the problem is that I was counting the bits calling the least significant bit the 0th bit. The least significant bit for the purposes of sigblock is the 1st bit. The correct code fragment for blocking SIGALRM is: oldmask = sigblock(1 << (SIGALRM - 1)); Keith Muller