X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=01cca6e6d08eac45ae3fbf63b999d453e40e14e3;hp=fc2cd9a145d25ac5ff0197fa132a87f5492661f7;hb=4d5a9b90c3e9cbdff019776d05792beb57fbfa31;hpb=a7f31bd369e5eda15361bef5aee2529bdb6eb89e diff --git a/gui.c b/gui.c index fc2cd9a1..01cca6e6 100644 --- a/gui.c +++ b/gui.c @@ -880,7 +880,13 @@ static int open_audiod_pipe(void) if (init) init = 0; else - sleep(1); + /* + * Sleep a bit to avoid a busy loop. As the call to sleep() may + * be interrupted by SIGCHLD, we simply wait until the call + * succeeds. + */ + while (sleep(2)) + ; /* nothing */ return para_open_audiod_pipe(conf.stat_cmd_arg); }