diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-03 14:29:37 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-03 14:29:37 +0000 |
commit | c5ce5f3c01af95093aea122a3be2b40288ab94e4 (patch) | |
tree | 074b12683d9f0867187023b1ba9f3ae34c69e8d4 /src/player.c | |
parent | 118acc5875420133061deeaf9682cc65c8ce876e (diff) | |
download | mpd-c5ce5f3c01af95093aea122a3be2b40288ab94e4.tar.gz mpd-c5ce5f3c01af95093aea122a3be2b40288ab94e4.tar.xz mpd-c5ce5f3c01af95093aea122a3be2b40288ab94e4.zip |
new setSigHandlersForDecoder() function, and be sure player/decode processes ignore SIGHUP signals
git-svn-id: https://svn.musicpd.org/mpd/trunk@2492 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/player.c b/src/player.c index f38b9384c..cb9b5ed1c 100644 --- a/src/player.c +++ b/src/player.c @@ -105,20 +105,12 @@ int playerInit() { player_pid = fork(); if(player_pid==0) { PlayerControl * pc = &(getPlayerData()->playerControl); - struct sigaction sa; clearUpdatePid(); unblockSignals(); - sa.sa_flags = 0; - sigemptyset(&sa.sa_mask); - - finishSigHandlers(); - sa.sa_handler = decodeSigHandler; - while(sigaction(SIGCHLD,&sa,NULL)<0 && errno==EINTR); - while(sigaction(SIGTERM,&sa,NULL)<0 && errno==EINTR); - while(sigaction(SIGINT,&sa,NULL)<0 && errno==EINTR); + setSigHandlersForDecoder(); while(close(listenSocket)<0 && errno==EINTR); freeAllInterfaces(); |