summaryrefslogtreecommitdiff
path: root/test/signal/sigchld.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/signal/sigchld.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/signal/sigchld.c')
-rw-r--r--test/signal/sigchld.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/test/signal/sigchld.c b/test/signal/sigchld.c
deleted file mode 100644
index 22febaca7..000000000
--- a/test/signal/sigchld.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/signal.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-
-#ifdef __ARCH_USE_MMU__
-
-static void test_handler(int signo)
-{
- write(1, "caught SIGCHLD\n", 15);
- return;
-}
-
-int main(void)
-{
- pid_t mypid;
- struct sigaction siga;
- static sigset_t set;
-
- /* Set up sighandling */
- sigfillset(&set);
- siga.sa_handler = test_handler;
- siga.sa_mask = set;
- siga.sa_flags = 0;
- if (sigaction(SIGCHLD, &siga, (struct sigaction *)NULL) != 0) {
- fprintf(stderr, "sigaction choked: %s!", strerror(errno));
- exit(EXIT_FAILURE);
- }
-
- /* Setup a child process to exercise the sig handling for us */
- mypid = getpid();
- if (fork() == 0) {
- int i;
-
- for (i=0; i < 3; i++) {
- sleep(2);
- kill(mypid, SIGCHLD);
- }
- _exit(EXIT_SUCCESS);
- }
-
-
- /* Wait for signals */
- write(1, "waiting for a SIGCHLD\n",22);
- for(;;) {
- sleep(10);
- if (waitpid(-1, NULL, WNOHANG | WUNTRACED) > 0)
- break;
- write(1, "after sleep\n", 12);
- }
-
- printf("Bye-bye! All done!\n");
- return 0;
-}
-
-#else
-
-int main(void)
-{
- printf("Skipping test on non-mmu host!\n");
- return 0;
-}
-
-#endif