X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=8b9f181b80edfb74b31ec08aed23d61d74c8c19f;hp=52f4ff4cb18919bea60e4106e350fa2d13de6874;hb=bc3ab35d42d4bb321f984806c43b7b991e973716;hpb=639a90049f74b4ce528376afe8ec8e84edf16208 diff --git a/audiod.c b/audiod.c index 52f4ff4c..8b9f181b 100644 --- a/audiod.c +++ b/audiod.c @@ -288,8 +288,7 @@ void __noreturn clean_exit(int status, const char *msg) PARA_EMERG_LOG("%s\n", msg); if (socket_name) unlink(socket_name); - if (stat_task->fd >= 0) - close_stat_pipe(); + close_stat_pipe(); exit(status); } @@ -882,6 +881,7 @@ static int audiod_get_socket(void) exit(EXIT_FAILURE); /* do not unlink socket */ } add_close_on_fork_list(fd); + mark_fd_nonblock(fd); return fd; } @@ -894,6 +894,7 @@ static int open_stat_pipe(void) ret = fd[1]; PARA_NOTICE_LOG("stat pipe opened, fd %d\n", ret); add_close_on_fork_list(ret); + mark_fd_nonblock(ret); } else clean_exit(EXIT_FAILURE, "failed to open status pipe"); return ret;