From 72e06e05a19c86b919b5ff389911afc1a73d19b3 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 13 Apr 2004 19:52:15 +0000 Subject: fix some misc chld signal handling for update process git-svn-id: https://svn.musicpd.org/mpd/trunk@737 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- TODO | 3 +++ src/directory.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 31ba0b9d5..6410853df 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,9 @@ that don't exist in the db, but do exit in the fs (i.e. calling updated on a newly created file). n) mpd command for rereading db + o) rewrite update functions to indicate if something was updated, then + when update process returns, indicate wheater db was updated + and should be reread by parent process 2) crosslink "list" stuff, for example, artists are crosslinked to alubms and vice versa, this way you can do list album artists or list artist albums, this diff --git a/src/directory.c b/src/directory.c index 370744aae..641ab46ed 100644 --- a/src/directory.c +++ b/src/directory.c @@ -120,7 +120,9 @@ void directory_sigChldHandler(int pid, int status) { "non-TERM signal: %i\n", WTERMSIG(status)); } - else if(WEXITSTATUS(status)==EXIT_SUCCESS) { + else if(!WIFSIGNALED(status) && + WEXITSTATUS(status)==EXIT_SUCCESS) + { DEBUG("direcotry_sigChldHandler: " "updated db succesffully\n"); directory_reReadDB = 1; @@ -150,8 +152,6 @@ int updateInit(FILE * fp, List * pathList) { directory_updatePid = fork(); if(directory_updatePid==0) { /* child */ - struct sigaction sa; - clearPlayerPid(); unblockSignals(); -- cgit v1.2.3