Xref: utzoo comp.unix.questions:5036 comp.unix.wizards:6097 Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!hao!oddjob!gargoyle!jpusa1!news From: news@jpusa1.UUCP (usenet) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: wait3 emulation in SYSTEMV ?? Summary: it depends... Message-ID: <643@jpusa1.UUCP> Date: 15 Jan 88 00:15:52 GMT References: <360@rruxa.UUCP> <7060@brl-smoke.ARPA> Reply-To: stu@jpusa1.UUCP (Stu Heiss) Organization: JPUSA - Chicago, IL Lines: 25 Expires: Followup-To: In article <7060@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: -In article <360@rruxa.UUCP> jpage@rruxa.UUCP (J Page) writes: ->UNIX Wizards: Anyone on the net have any suggestions, or ideas on -> how to emulate the 4.2BSD wait3() system call under System V??? - -Basically, you can't, at least not with the current release. - It depends on what you're trying to do. If all you need is a nonblocking wait you can do something like: noop(){;} nonblockingwait() { int i, w; int (*oldsig)() = signal(SIGALRM, noop); int oldalrm = alarm(1); i = wait(&w); alarm(0); signal(SIGALRM, oldsig); alarm(oldalrm); ... } -- Stu Heiss {gargoyle,ihnp4}!jpusa1!stu