Converting wait3() to System V
William Kucharski
kucharsk at uts.amdahl.com
Sat Sep 16 12:49:19 AEST 1989
In article <10800032 at bradley> vijay at bradley.UUCP writes:
>
>Hi:
> I hope you can give me some pointers. I am trying to port
>an application from a 4.3 BSD UNIX to System V. There is a
>wait3() call in the application that needs to be converted to
>System V wait() or equivalent. And that's where I am stuck. Any help
>would be appreciated.
>
>Thanks in advance...
It depends upon the parameters you're trying to feed to the wait3() call.
If you're just trying to do a WNOHANG-style non-blocking wait, try something
along the lines of (PSEUDO-C Code Follows):
alarm(1); /* set alarm time for around 1 second */
pid = wait(&status); /* blocking wait(2) */
alarm(0); /* reset alarm */
If the wait succeeds - no problem. If it doesn't, it will be awakened by
the alarm call.
--
===============================================================================
| ARPA: kucharsk at uts.amdahl.com | William Kucharski |
| UUCP: ...!{ames,apple,sun,uunet}!amdahl!kucharsk | Amdahl Corporation |
===============================================================================
| Saying: "It's a window system named 'X,' NOT a system named 'X Windows'" |
===============================================================================
| Disclaimer: "The opinions expressed above may not agree with mine at any |
| other moment in time, so they certainly can't be those of my |
| employer." |
===============================================================================
More information about the Comp.unix.questions
mailing list