summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-waitpid.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-26 05:35:33 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-26 05:35:33 +0000
commit9531825dd01559105b7b3c1d493e4a13d358988a (patch)
tree8c14a6740e3512fb546725d46c41f21f11d37b12 /openbsd-compat/bsd-waitpid.c
parent8ca935655e3c0a8ddae90f8609433eca203054f0 (diff)
- Fix pointer issues in waitpid() and wait() replaces. Patch by Lutz
Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
Diffstat (limited to 'openbsd-compat/bsd-waitpid.c')
-rw-r--r--openbsd-compat/bsd-waitpid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c
index 1a96bbf7f..47b4446dc 100644
--- a/openbsd-compat/bsd-waitpid.c
+++ b/openbsd-compat/bsd-waitpid.c
@@ -22,7 +22,7 @@
22 22
23#include "includes.h" 23#include "includes.h"
24 24
25RCSID("$Id: bsd-waitpid.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); 25RCSID("$Id: bsd-waitpid.c,v 1.3 2001/03/26 05:35:34 mouring Exp $");
26 26
27#ifndef HAVE_WAITPID 27#ifndef HAVE_WAITPID
28#include <errno.h> 28#include <errno.h>
@@ -43,7 +43,9 @@ waitpid(int pid, int *stat_loc, int options)
43 pid = 0; /* wait4() wants pid=0 for indiscriminate wait. */ 43 pid = 0; /* wait4() wants pid=0 for indiscriminate wait. */
44 } 44 }
45 wait_pid = wait4(pid, &statusp, options, NULL); 45 wait_pid = wait4(pid, &statusp, options, NULL);
46 stat_loc = (int *)statusp.w_status; 46 if (stat_loc)
47 *stat_loc = (int) statusp.w_status;
48
47 return wait_pid; 49 return wait_pid;
48} 50}
49 51