Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-03 07:58:18 +0400
committerChristopher Faylor <me@cgf.cx>2000-09-03 07:58:18 +0400
commitf1930aec47835e0ce231dff1893826824a462567 (patch)
tree1f55fcc9c63b707adc8ea3d767ebd7510904f148 /winsup/testsuite/winsup.api/sigchld.c
parent42f03f675735b0ab55f86824894706e39878b5cc (diff)
Importing Egor's testsuite.
Diffstat (limited to 'winsup/testsuite/winsup.api/sigchld.c')
-rw-r--r--winsup/testsuite/winsup.api/sigchld.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/sigchld.c b/winsup/testsuite/winsup.api/sigchld.c
new file mode 100644
index 000000000..a7d1069b7
--- /dev/null
+++ b/winsup/testsuite/winsup.api/sigchld.c
@@ -0,0 +1,20 @@
+#include <sys/types.h>
+#include <unistd.h>
+#include <signal.h>
+
+int no_signal_caught = 1;
+
+void handler ( int signo )
+{
+ no_signal_caught = 0;
+}
+
+main()
+{
+ pid_t pid;
+ signal ( SIGCHLD, handler );
+ pid = fork();
+ if ( pid == 0 ) exit ( 0 );
+ sleep ( 2 );
+ exit ( no_signal_caught );
+}