mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Fix waitpid() call to only run in error case (merge error)
This commit is contained in:
parent
27b4293285
commit
736f0e2531
@ -1,3 +1,8 @@
|
||||
Wed Sep 19 17:42:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/remote_internal.c: Fix waitpid() call to only be done
|
||||
in doRemoteOpen error case (merge error from previous commit)
|
||||
|
||||
Wed Sep 19 13:39:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.in: Use pkg-config to locate gnutls if pkg-config
|
||||
|
@ -647,14 +647,14 @@ doRemoteOpen (virConnectPtr conn, struct private_data *priv, const char *uri_str
|
||||
if (priv->uses_tls && priv->session)
|
||||
gnutls_bye (priv->session, GNUTLS_SHUT_RDWR);
|
||||
close (priv->sock);
|
||||
}
|
||||
if (priv->pid > 0) {
|
||||
pid_t reap;
|
||||
do {
|
||||
reap = waitpid(priv->pid, NULL, 0);
|
||||
if (reap == -1 && errno == EINTR)
|
||||
continue;
|
||||
} while (reap != -1 && reap != priv->pid);
|
||||
if (priv->pid > 0) {
|
||||
pid_t reap;
|
||||
do {
|
||||
reap = waitpid(priv->pid, NULL, 0);
|
||||
if (reap == -1 && errno == EINTR)
|
||||
continue;
|
||||
} while (reap != -1 && reap != priv->pid);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free up the URL and strings. */
|
||||
|
Loading…
Reference in New Issue
Block a user