diff options
author | Alex Graveley <alex@ximian.com> | 2001-10-26 10:19:36 +0000 |
---|---|---|
committer | Alex Graveley <orph@src.gnome.org> | 2001-10-26 10:19:36 +0000 |
commit | 575ca40ccff3ef982f8d6bfe7595879dcc7f2545 (patch) | |
tree | f9155a83a33414a44ecd35a62f59a073509b0316 | |
parent | 90301b324a896d04bbad6c340307120f51adbf63 (diff) | |
download | libsoup-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | libsoup/soup-socket.c | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -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", |