Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Fix asynchronous posix_spawn child exit status (and test for...
details: https://anonhg.NetBSD.org/src/rev/0799511b82f5
branches: trunk
changeset: 778712:0799511b82f5
user: martin <martin%NetBSD.org@localhost>
date: Mon Apr 09 19:42:06 2012 +0000
description:
Fix asynchronous posix_spawn child exit status (and test for it).
diffstat:
sys/kern/kern_exec.c | 6 +++---
tests/lib/libc/gen/posix_spawn/t_fileactions.c | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 35f6175306e8 -r 0799511b82f5 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Mon Apr 09 19:22:49 2012 +0000
+++ b/sys/kern/kern_exec.c Mon Apr 09 19:42:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.348 2012/04/08 11:27:44 martin Exp $ */
+/* $NetBSD: kern_exec.c,v 1.349 2012/04/09 19:42:06 martin Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.348 2012/04/08 11:27:44 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.349 2012/04/09 19:42:06 martin Exp $");
#include "opt_exec.h"
#include "opt_ktrace.h"
@@ -2003,7 +2003,7 @@
* A NetBSD specific workaround is POSIX_SPAWN_RETURNERROR as
* flag bit in the attrp argument to posix_spawn(2), see above.
*/
- exit1(l, W_EXITCODE(127, SIGABRT));
+ exit1(l, W_EXITCODE(127, 0));
}
void
diff -r 35f6175306e8 -r 0799511b82f5 tests/lib/libc/gen/posix_spawn/t_fileactions.c
--- a/tests/lib/libc/gen/posix_spawn/t_fileactions.c Mon Apr 09 19:22:49 2012 +0000
+++ b/tests/lib/libc/gen/posix_spawn/t_fileactions.c Mon Apr 09 19:42:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fileactions.c,v 1.4 2012/04/08 11:27:46 martin Exp $ */
+/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -237,8 +237,7 @@
* return exit code 127
*/
waitpid(pid, &status, 0);
- ATF_REQUIRE(WEXITSTATUS(status) == 127);
-
+ ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 127);
} else {
/*
* The error has been noticed early enough, no child has
Home |
Main Index |
Thread Index |
Old Index