summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Graveley <alex@ximian.com>2001-10-26 10:19:36 +0000
committerAlex Graveley <orph@src.gnome.org>2001-10-26 10:19:36 +0000
commit575ca40ccff3ef982f8d6bfe7595879dcc7f2545 (patch)
treef9155a83a33414a44ecd35a62f59a073509b0316
parent90301b324a896d04bbad6c340307120f51adbf63 (diff)
downloadlibsoup-575ca40ccff3ef982f8d6bfe7595879dcc7f2545.tar.gz
Use WUNTRACED, which should fix possible hang situation.
2001-10-26 Alex Graveley <alex@ximian.com> * src/libsoup/soup-socket.c (soup_address_new): Use WUNTRACED, which should fix possible hang situation.
-rw-r--r--ChangeLog5
-rw-r--r--libsoup/soup-socket.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fc4ebe7..bac1b9c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2001-10-26 Alex Graveley <alex@ximian.com>
+ * src/libsoup/soup-socket.c (soup_address_new): Use WUNTRACED,
+ which should fix possible hang situation.
+
+2001-10-26 Alex Graveley <alex@ximian.com>
+
* src/libsoup/soup-transfer.c (issue_chunk_callback): Address bug
where data buffer passed to chunk callback could be invalid due to
appending a null. Just don't addend NULL for chunk callbacks.
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index 16e0af63..d7727f06 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -785,6 +785,9 @@ soup_address_new (const gchar* name,
signal (SIGCHLD, SIG_IGN);
+ /*
+ * This will send the parent process a SIGSTOP.
+ */
if (ptrace (PTRACE_ATTACH, getppid (), NULL, NULL) == -1) {
/*
* Attach failed; it's probably already being
@@ -798,9 +801,9 @@ soup_address_new (const gchar* name,
}
/*
- * We just SIGSTOPped it; we need to CONT it now.
+ * Wait for the parent to actually STOP.
*/
- waitpid (getppid (), NULL, 0);
+ waitpid (getppid (), NULL, WUNTRACED);
if (ptrace (PTRACE_DETACH, getppid (), NULL, NULL) == -1)
g_warning ("ptrace: Detach failed: %s",