Attempt to close race between dying rpm-fake-resolver and other rpm-fake processes.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 8 Jan 2008 16:53:54 +0000 (16:53 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 8 Jan 2008 16:53:54 +0000 (16:53 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2655 94cd875c-1c1d-0410-91d2-eb244daf1a30

src/rpm-fake.c

index d41e181..b0ce156 100644 (file)
@@ -510,6 +510,8 @@ exitRPMFake()
     uint8_t    c;
     if (read(sync_sock, &c, 1)!=1) { /*...*/ }
     if (write(pw_sock, "Q", 1)!=1) { /*...*/ }
+    /* sync_sock should return EOF when the resolver exits... */
+    if (read(sync_sock, &c, 1)!=0) { /*...*/ }
   }
 }