leei@princeton.UUCP (01/21/84)
Anyone out there able to give me some very large hints about how to convert a piece of software which uses Berkeley 4.1's jobs library to run under 4.2. What I have is a local text editor that the secretaries love (it's very simple) and we can't get them to move onto the new machine until I can get it working. Has anyone out there implemented a jobs downward compatibility package or have available some sort of Field Guide to Conversion that would describe the kinds of things I need to do? I can almost certainly puzzle it out given time, but I'm sure someone else could probably explain it to me really a lot more clearly than the old man page search. Even just a list of all of the relevant 4.2 routines would be nice. Of course, reply to me by mail. If I find out anything generally useful, I'll post it. -- "... wiiiiiith a Herring!" Lee Iverson Princeton University {allegra|ulysses}!princeton!leei
chris@umcp-cs.UUCP (01/21/84)
The 4.2 UCBMail source has two files "sigretro.c" and "sigretro.h" that seem to do the trick. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris.umcp-cs@CSNet-Relay
john@genrad.UUCP (John Nelson) (01/22/84)
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).