mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35: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>
|
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
|
* 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)
|
if (priv->uses_tls && priv->session)
|
||||||
gnutls_bye (priv->session, GNUTLS_SHUT_RDWR);
|
gnutls_bye (priv->session, GNUTLS_SHUT_RDWR);
|
||||||
close (priv->sock);
|
close (priv->sock);
|
||||||
}
|
if (priv->pid > 0) {
|
||||||
if (priv->pid > 0) {
|
pid_t reap;
|
||||||
pid_t reap;
|
do {
|
||||||
do {
|
reap = waitpid(priv->pid, NULL, 0);
|
||||||
reap = waitpid(priv->pid, NULL, 0);
|
if (reap == -1 && errno == EINTR)
|
||||||
if (reap == -1 && errno == EINTR)
|
continue;
|
||||||
continue;
|
} while (reap != -1 && reap != priv->pid);
|
||||||
} while (reap != -1 && reap != priv->pid);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free up the URL and strings. */
|
/* Free up the URL and strings. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user