2003-04-03 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-04-03 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-04-02 Joe Shaw <joe@ximian.com>
* libsoup/soup-context.c (connection_death): Only drop the
2003-04-02 Joe Shaw <joe@ximian.com>
* libsoup/soup-context.c (connection_death): Only drop the
g_source_remove (state->watch);
close (state->fd);
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;
if (WIFSIGNALED (ret) || WEXITSTATUS (ret) != 1)
goto ERROR;
close (state->fd);
/* FIXME: Wait for HUP signal before doing this */
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);
}
g_hash_table_remove (lookup_hash, state->name);
* Wait for the SIGSTOP from PTRACE_ATTACH to arrive at the
* parent.
*/
* 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",
if (ptrace (SOUP_PTRACE_DETACH, getppid (), NULL, NULL) == -1)
g_warning ("ptrace: Detach failed: %s",
g_source_remove (state->watch);
close (state->fd);
kill (state->pid, SIGKILL);
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)
+ ;
state->data);
close (state->fd);
state->data);
close (state->fd);
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
g_free (state);
return FALSE;
}
g_free (state);
return FALSE;
}
close (state->fd);
kill (state->pid, SIGKILL);
close (state->fd);
kill (state->pid, SIGKILL);
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
{
SoupSSLInfo *ssl_info = user_data;
{
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);
g_io_channel_unref (ssl_info->real_sock);
g_free (ssl_info);