Unblock SIGCHLD for launched processes

pull/194/head
martin 2016-05-30 20:41:26 +01:00
parent 16885e69fe
commit f572e331ee
1 changed files with 7 additions and 0 deletions

View File

@ -627,6 +627,13 @@ launch ( const char *executable, const char *client_id )
setenv( "NSM_URL", url, 1 );
/* Ensure the launched process can receive SIGCHLD */
/* Unblocking SIGCHLD here does NOT unblock it for nsmd itself */
sigset_t mask;
sigemptyset( &mask );
sigaddset( &mask, SIGCHLD );
sigprocmask(SIG_UNBLOCK, &mask, NULL );
if ( -1 == execvp( executable, args ) )
{
WARNING( "Error starting process: %s", strerror( errno ) );