Bug in bsd-waitpid.c and bsd-nextstep.c
Lutz Jaenicke
Lutz.Jaenicke at aet.TU-Cottbus.DE
Sun Mar 25 23:13:28 EST 2001
Hi!
The handling of the "status" information in bsd-waitpid.c and bsd-nextstep.c
seems to be bit odd. Patch attached.
Best regards,
Lutz
--
Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153
-------------- next part --------------
--- bsd-nexstep.c.org Sun Mar 25 15:08:05 2001
+++ bsd-nextstep.c Sun Mar 25 15:09:42 2001
@@ -37,7 +37,8 @@
#undef wait /* Use NeXT's wait() function */
wait_pid = wait(&statusp);
- status = (int *) statusp.w_status;
+ if (status)
+ *status = (int)statusp.w_status;
return wait_pid;
}
--- bsd-waitpid.c.org Sun Mar 25 15:06:20 2001
+++ bsd-waitpid.c Sun Mar 25 15:07:36 2001
@@ -43,7 +43,8 @@
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;
}
More information about the openssh-unix-dev
mailing list