From: Andre Noll Date: Mon, 7 Jun 2010 08:16:41 +0000 (+0200) Subject: Merge remote branch 'meins/master' X-Git-Tag: v0.4.3~19 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=7a1764a24f86bd33beff864b52605ae739a65ca5;hp=80ce39491e340c83d05c2fa433f5033bd7bd80d4;p=paraslash.git Merge remote branch 'meins/master' --- diff --git a/gui.c b/gui.c index fa1538b0..dbe0a19c 100644 --- a/gui.c +++ b/gui.c @@ -902,7 +902,13 @@ static int open_stat_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 */ ret = para_exec_cmdline_pid(&pid, conf.stat_cmd_arg, fds); if (ret < 0) return ret;