xref: /openbsd-src/gnu/usr.bin/cvs/windows-NT/waitpid.c (revision 1e72d8d26fae84dfb4bcd4cecabd10b989ec3f29)
1*1e72d8d2Sderaadt /* waitpid.c --- waiting for process termination, under Windows NT
2*1e72d8d2Sderaadt    Jim Blandy <jimb@cyclic.com> --- August 1995  */
3*1e72d8d2Sderaadt 
4*1e72d8d2Sderaadt #include <assert.h>
5*1e72d8d2Sderaadt #include <stdio.h>
6*1e72d8d2Sderaadt #include <process.h>
7*1e72d8d2Sderaadt #include <errno.h>
8*1e72d8d2Sderaadt 
9*1e72d8d2Sderaadt #include "config.h"
10*1e72d8d2Sderaadt 
11*1e72d8d2Sderaadt /* Wait for the process PID to exit.  Put the return status in *statusp.
12*1e72d8d2Sderaadt    OPTIONS is not supported yet under Windows NT.  We hope it's always zero.  */
waitpid(pid,statusp,options)13*1e72d8d2Sderaadt pid_t waitpid (pid, statusp, options)
14*1e72d8d2Sderaadt      pid_t pid;
15*1e72d8d2Sderaadt      int *statusp;
16*1e72d8d2Sderaadt      int options;
17*1e72d8d2Sderaadt {
18*1e72d8d2Sderaadt     /* We don't know how to deal with any options yet.  */
19*1e72d8d2Sderaadt     assert (options == 0);
20*1e72d8d2Sderaadt 
21*1e72d8d2Sderaadt     return _cwait (statusp, pid, _WAIT_CHILD);
22*1e72d8d2Sderaadt }
23