[evolution-patches] libsoup EINTR patch



Just forwarding patching from soup 0.7.x

-JP
-- 
JP Rosevear <jpr ximian com>
Ximian, Inc.
? soup-waitpid.patch
? soup-waitpid2.patch
? soup2-waitpid.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsoup/ChangeLog,v
retrieving revision 1.289
diff -u -r1.289 ChangeLog
--- ChangeLog	31 Mar 2003 22:32:50 -0000	1.289
+++ ChangeLog	2 Apr 2003 20:09:45 -0000
@@ -1,3 +1,10 @@
+2003-04-02  JP Rosevear  <jpr ximian com>
+
+	* libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
+	error during waitpid
+
+	* libsoup/soup-address.c: ditto
+
 2003-03-31  Ian Peters  <itp ximian com>
 
 	* libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
Index: libsoup/soup-address.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-address.c,v
retrieving revision 1.8
diff -u -r1.8 soup-address.c
--- libsoup/soup-address.c	11 Feb 2003 21:29:31 -0000	1.8
+++ libsoup/soup-address.c	2 Apr 2003 20:09:45 -0000
@@ -696,7 +696,7 @@
 
 		g_source_remove (state->watch);
 		close (state->fd);
-		waitpid (state->pid, &ret, 0);
+		while (waitpid (state->pid, &ret, 0) == -1 && errno == EINTR);
 
 		if (WIFSIGNALED (ret) || WEXITSTATUS (ret) != 1) 
 			goto ERROR;
@@ -736,7 +736,7 @@
 		close (state->fd);
 
 		/* FIXME: Wait for HUP signal before doing this */
-		waitpid (state->pid, NULL, 0);
+		while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR);
 	}
 
 	g_hash_table_remove (lookup_hash, state->name);
@@ -968,7 +968,7 @@
 		 * Wait for the SIGSTOP from PTRACE_ATTACH to arrive at the
 		 * parent.  
 		 */
-		waitpid (getppid (), NULL, WUNTRACED);
+		while (waitpid (getppid (), NULL, WUNTRACED) == -1 && errno == EINTR);		
 
 		if (ptrace (SOUP_PTRACE_DETACH, getppid (), NULL, NULL) == -1)
 			g_warning ("ptrace: Detach failed: %s", 
@@ -1065,7 +1065,7 @@
 		g_source_remove (state->watch);
 		close (state->fd);
 		kill (state->pid, SIGKILL);
-		waitpid (state->pid, NULL, 0);
+		while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR);
 
 		g_free (state);
 	}
@@ -1208,7 +1208,7 @@
 					state->data);
 
 			close (state->fd);
-			waitpid (state->pid, NULL, 0);
+			while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR);
 			g_free (state);
 			return FALSE;
 		}
@@ -1364,7 +1364,7 @@
 
 	close (state->fd);
 	kill (state->pid, SIGKILL);
-	waitpid (state->pid, NULL, 0);
+	while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR);
 
 	g_free(state);
 }
Index: libsoup/soup-ssl.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-ssl.c,v
retrieving revision 1.26
diff -u -r1.26 soup-ssl.c
--- libsoup/soup-ssl.c	10 Mar 2003 22:44:02 -0000	1.26
+++ libsoup/soup-ssl.c	2 Apr 2003 20:09:45 -0000
@@ -59,7 +59,7 @@
 {
 	SoupSSLInfo *ssl_info = user_data;
 
-	waitpid (ssl_info->ppid, NULL, 0);
+	while (waitpid (ssl_info->ppid, NULL, 0) == -1 && errno = EINTR);
 	
 	g_io_channel_unref (ssl_info->real_sock);
 	g_free (ssl_info);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]