Felix Schmidt - 2013-07-05

Hi,

i'm happy user of empty, but just hit the following problem: When i stop the process under empty control with SIGSTOP, the empty process gets a SIGCHLD and terminates.
To overcome this i slightly modified the code so that no SIGCHLD is sent for SIGSTOP/SIGCONT.

Here's the patch for empty.c, if anyone is interested(version 0.6.18b)

162a163,164

  struct sigaction    sa;         /* sa structure for signal handler */

531,532c533,538
< for (i = 1; i < 32; i++)
< signal(i, fsignal); / hook signals /


  memset ((char*)&sa, 0, sizeof(sa));
  sa.sa_handler = fsignal;
  sa.sa_flags = SA_NOCLDSTOP;

  for (i = 1; i < 32; i++) 
          sigaction(i, &sa, NULL);        /* hook signals */