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

sigchld.c « winsup.api « testsuite « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b12876d4af0f9749c95aaccabface15ee9754c42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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 );
}