]> TLD Linux GIT Repositories - packages/libvirt.git/blob - libvirt-daemon-fix.patch
4b3270030a2f339601aafd1b9ab78171b950ff1f
[packages/libvirt.git] / libvirt-daemon-fix.patch
1 diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c
2 index 5d92c7def7..99530fd146 100644
3 --- a/src/util/virdaemon.c
4 +++ b/src/util/virdaemon.c
5 @@ -97,15 +97,14 @@ virDaemonForkIntoBackground(const char *argv0)
6      default:
7          {
8              /* parent */
9 -            int got, exitstatus = 0;
10 +            int exitstatus = 0;
11              int ret;
12              char status;
13  
14              VIR_FORCE_CLOSE(statuspipe[1]);
15  
16              /* We wait to make sure the first child forked successfully */
17 -            if ((got = virProcessWait(pid, &exitstatus, 0)) < 0 ||
18 -                got != pid ||
19 +            if (virProcessWait(pid, &exitstatus, 0) < 0 ||
20                  exitstatus != 0) {
21                  goto error;
22              }