From 9531825dd01559105b7b3c1d493e4a13d358988a Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Mon, 26 Mar 2001 05:35:33 +0000 Subject: - Fix pointer issues in waitpid() and wait() replaces. Patch by Lutz Jaenicke --- openbsd-compat/bsd-waitpid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/bsd-waitpid.c') 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 @@ #include "includes.h" -RCSID("$Id: bsd-waitpid.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); +RCSID("$Id: bsd-waitpid.c,v 1.3 2001/03/26 05:35:34 mouring Exp $"); #ifndef HAVE_WAITPID #include @@ -43,7 +43,9 @@ waitpid(int pid, int *stat_loc, int options) pid = 0; /* wait4() wants pid=0 for indiscriminate wait. */ } wait_pid = wait4(pid, &statusp, options, NULL); - stat_loc = (int *)statusp.w_status; + if (stat_loc) + *stat_loc = (int) statusp.w_status; + return wait_pid; } -- cgit v1.2.3