Changeset 873
- Timestamp:
- Nov 23, 2003, 5:41:41 AM (22 years ago)
- File:
- 
      - 1 edited
 
 - 
          
  trunk/src/emx/src/lib/sys/__waitpid.c (modified) (2 diffs, 1 prop)
 
Legend:
- Unmodified
- Added
- Removed
- 
      trunk/src/emx/src/lib/sys/__waitpid.c- 
Property       cvs2svn:cvs-rev
 changed from       1.3to1.4
 r872 r873 1 /* sys/waitpid.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */ 1 /* sys/waitpid.c (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes 2 -- Copyright (c) 2003 by Knut St. Osmundsen */ 2 3 3 4 #include "libc-alias.h" 4 5 #define INCL_DOSPROCESS 6 #define INCL_ERRORS 5 7 #define INCL_FSMACROS 6 8 #include <os2emx.h> 9 #include <sys/wait.h> 7 10 #include <emx/syscalls.h> 8 11 #include "syscalls.h" … … 10 13 int __waitpid (int pid, int *status, int options) 11 14 { 12 ULONG rc;13 RESULTCODES res;14 PID pid2;15 FS_VAR();15 ULONG rc; 16 RESULTCODES res; 17 PID pid2; 18 FS_VAR(); 16 19 17 if (pid == -1) 18 pid = 0; 19 FS_SAVE_LOAD(); 20 rc = DosWaitChild (DCWA_PROCESS, DCWW_WAIT, &res, &pid2, pid); 21 FS_RESTORE(); 22 if (rc != 0) 20 if (pid == -1) 21 pid = 0; 22 FS_SAVE_LOAD(); 23 rc = DosWaitChild(DCWA_PROCESS, 24 options & WNOHANG ? DCWW_NOWAIT : DCWW_WAIT, 25 &res, &pid2, pid); 26 FS_RESTORE(); 27 if ( rc == ERROR_CHILD_NOT_COMPLETE 28 && (options & WNOHANG)) 29 return 0; 30 if (rc != 0) 23 31 { 24 _sys_set_errno(rc);25 return -1;32 _sys_set_errno(rc); 33 return -1; 26 34 } 27 *status = res.codeResult << 8;28 return pid2;35 *status = res.codeResult << 8; 36 return pid2; 29 37 } 
- 
Property       cvs2svn:cvs-rev
 changed from       
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
