diff options
Diffstat (limited to 'test/signal/sigchld.c')
-rw-r--r-- | test/signal/sigchld.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/signal/sigchld.c b/test/signal/sigchld.c index 60ddf4b3c..d53165419 100644 --- a/test/signal/sigchld.c +++ b/test/signal/sigchld.c @@ -7,16 +7,15 @@ #include <unistd.h> -void test_handler(int signo) +#ifdef __ARCH_USE_MMU__ + +static void test_handler(int signo) { write(1, "caught SIGCHLD\n", 15); return; } - -#ifdef __ARCH_USE_MMU__ - -int main(void) +int main(void) { pid_t mypid; struct sigaction siga; @@ -31,7 +30,6 @@ int main(void) fprintf(stderr, "sigaction choked: %s!", strerror(errno)); exit(EXIT_FAILURE); } - /* Setup a child process to exercise the sig handling for us */ mypid = getpid(); @@ -52,7 +50,7 @@ int main(void) sleep(10); if (waitpid(-1, NULL, WNOHANG | WUNTRACED) > 0) break; - write(1, "after sleep\n", 12); + write(1, "after sleep\n", 12); } printf("Bye-bye! All done!\n"); |