Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: fix wait for backup completeness
  • Loading branch information
perexg committed Jun 20, 2015
1 parent 51d4476 commit 8d561f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config.c
Expand Up @@ -1338,6 +1338,7 @@ dobackup(const char *oldver)
usleep(20000);
if (code == -ECHILD)
code = 0;
tvhinfo("config", "backup: completed");
}

if (code) {
Expand Down
5 changes: 4 additions & 1 deletion src/spawn.c
Expand Up @@ -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)
Expand Down

0 comments on commit 8d561f1

Please sign in to comment.