From: Andre Noll Date: Sun, 6 Jun 2010 16:35:47 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Tag: v0.4.3~19^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=9b565c60fd159e12d255bb18db9dbff066deebea;hp=04d57a4d05ce0a0f8d16c32d14d056e312527808 Merge branch 'maint' Conflicts: gui.c --- 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;