Module Name: src
Committed By: pooka
Date: Thu Jan 13 12:55:19 UTC 2011
Modified Files:
src/tests/fs/common: fstest_ffs.c
Log Message:
wrap system() in SIG_DFL so that child-bearing fs tests (puffs,
nfs) don't go cuckoo when the process executed by system() takes a
backstage left.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/common/fstest_ffs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/common/fstest_ffs.c
diff -u src/tests/fs/common/fstest_ffs.c:1.3 src/tests/fs/common/fstest_ffs.c:1.4
--- src/tests/fs/common/fstest_ffs.c:1.3 Fri Jan 7 11:52:59 2011
+++ src/tests/fs/common/fstest_ffs.c Thu Jan 13 12:55:19 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: fstest_ffs.c,v 1.3 2011/01/07 11:52:59 pooka Exp $ */
+/* $NetBSD: fstest_ffs.c,v 1.4 2011/01/13 12:55:19 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -59,10 +59,15 @@
int res;
static unsigned int num = 0;
struct ffstestargs *args;
+ struct sigaction act, oact;
size /= 512;
snprintf(cmd, 1024, "newfs -F -s %"PRId64" %s >/dev/null", size, image);
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = SIG_DFL;
+ sigaction(SIGCHLD, &act, &oact);
res = system(cmd);
+ sigaction(SIGCHLD, &oact, NULL);
if (res != 0)
return res;