From: Jaroslav Kysela Date: Sat, 20 Jun 2015 09:31:15 +0000 (+0200) Subject: config: fix wait for backup completeness X-Git-Tag: v4.0.6~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abd97d598722fe8751e91452d1a9be9f4025df98;p=thirdparty%2Ftvheadend.git config: fix wait for backup completeness --- diff --git a/src/config.c b/src/config.c index 71e9ab0ee..10d20646a 100644 --- a/src/config.c +++ b/src/config.c @@ -1243,6 +1243,7 @@ dobackup(const char *oldver) usleep(20000); if (code == -ECHILD) code = 0; + tvhinfo("config", "backup: completed"); } if (code) { diff --git a/src/spawn.c b/src/spawn.c index 18ee0ba3a..f31106193 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -241,8 +241,11 @@ spawn_reap(pid_t wpid, char *stxt, size_t stxtlen) return -EAGAIN; if(pid < 0) return -errno; - if(pid < 1) + if(pid < 1) { + if (wpid > 0 && pid != wpid) + return -EAGAIN; return 0; + } pthread_mutex_lock(&spawn_mutex); LIST_FOREACH(s, &spawns, link)