lxluislxl / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Couldn't catch the SIG_CHLD in my program. #341

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
My program spawn another executable files and can't catch moment then this file 
stop.
I found problem in mongoose 3.1 in code (line 4294): 
#if !defined(_WIN32) && !defined(__SYMBIAN32__)
  // Ignore SIGPIPE signal, so if browser cancels the request, it
  // won't kill the whole process.
  (void) signal(SIGPIPE, SIG_IGN);
  // Also ignoring SIGCHLD to let the OS to reap zombies properly.
  (void) signal(SIGCHLD, SIG_IGN);
#endif // !_WIN32

signal system function and signal(SIGCHLD, SIG_IGN) set ignore for childs 
signals.

Original issue reported on code.google.com by yand...@gmail.com on 7 Apr 2012 at 8:45

GoogleCodeExporter commented 8 years ago
Re-set child signal handler AFTER mg_start().

Original comment by valenok on 7 Apr 2012 at 9:01