Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site genrad.UUCP Path: utzoo!linus!security!genrad!john From: john@genrad.UUCP (John Nelson) Newsgroups: net.unix-wizards Subject: Re: 4.2 BSD replacement for jobs Message-ID: <3804@genrad.UUCP> Date: Sat, 21-Jan-84 19:42:03 EST Article-I.D.: genrad.3804 Posted: Sat Jan 21 19:42:03 1984 Date-Received: Sat, 21-Jan-84 23:38:21 EST References: <170@princeton.UUCP> Organization: GenRad, Bolton, Mass. Lines: 35 I DID post such a thing on net.sources about a week ago. Sigh. 1. replace sigset and sigsys with signal(). #define sigset signal works great. Also note that 4.2 can be detected from signal.h - I always use the code fragment below, and ifdef BSD42 when necessary: #ifdef SIGVTALRM #define BSD42 #endif 2. sighold, sigrelse sigignore can be emulated as: sighold(sig) int sig; { sigblock (1 << (sig - 1)); } sigrelse(sig) int sig; { sigsetmask(sigblock(0) & ~(1 << (sig - 1))); } sigignore(sig) int sig; { signal(sig, SIG_IGN); } 3. Watch out for sigpause(). 4.2 has it's own sigpause that has a different syntax. 4. Be careful about signal handlers. Signals handlers do NOT revert to the default automatically. This is the same behavior as sigset and sigsys, but different from the old signal(). Signals are also blocked within the handler that caught them (translation: An extra sigrelse may be necessary to unblock the signal if you wish to resend it after catching it and cleaning up).