newlib/winsup/testsuite/winsup.api/sigchld.c
Christopher Faylor 9b978ffe8b * libltp/include/test.h: Fix C warnings.
* winsup.api/checksignal.c: Ditto.
* winsup.api/crlf.c: Ditto.
* winsup.api/devzero.c: Ditto.
* winsup.api/iospeed.c: Ditto.
* winsup.api/mmaptest01.c: Ditto.
* winsup.api/mmaptest02.c: Ditto.
* winsup.api/mmaptest03.c: Ditto.
* winsup.api/mmaptest04.c: Ditto.
* winsup.api/nullgetcwd.c: Ditto.
* winsup.api/sigchld.c: Ditto.
* winsup.api/signal-into-win32-api.c: Ditto.
* winsup.api/systemcall.c: Ditto.
* winsup.api/waitpid.c: Ditto.
* winsup.api/pthread/mainthreadexits.c: Ditto.
* winsup.api/pthread/test.h: Ditto.
* winsup.api/pthread/threadidafterfork.c: Ditto.
* Makefile.in: Remove cygrun.exe from RUNTIME since it is built here now.
2003-01-23 21:21:28 +00:00

23 lines
316 B
C

#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
int no_signal_caught = 1;
void handler ( int signo )
{
no_signal_caught = 0;
}
int
main()
{
pid_t pid;
signal ( SIGCHLD, handler );
pid = fork();
if ( pid == 0 ) exit ( 0 );
sleep ( 2 );
exit ( no_signal_caught );
}