* @param proc pointer to process structure
*/
static DWORD_WINAPI
-ChildWaitThread (void *arg)
+child_wait_thread (void *arg)
{
struct GNUNET_OS_Process *proc = (struct GNUNET_OS_Process *) arg;
gnunet_proc->handle = proc.hProcess;
gnunet_proc->control_pipe = control_pipe;
- CreateThread (NULL, 64000, ChildWaitThread, (void *) gnunet_proc, 0, NULL);
+ CreateThread (NULL, 64000, &child_wait_thread, (void *) gnunet_proc, 0, NULL);
ResumeThread (proc.hThread);
CloseHandle (proc.hThread);
}
if (lsocks != NULL && lsocks[0] != INVALID_SOCKET)
{
- lsocks_pipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO);
+ lsocks_pipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO);
if (lsocks_pipe == NULL)
{
gnunet_proc->handle = proc.hProcess;
gnunet_proc->control_pipe = control_pipe;
- CreateThread (NULL, 64000, ChildWaitThread, (void *) gnunet_proc, 0, NULL);
+ CreateThread (NULL, 64000, &child_wait_thread, (void *) gnunet_proc, 0, NULL);
ResumeThread (proc.hThread);
CloseHandle (proc.hThread);
#ifndef MINGW
pid_t pid = proc->pid;
+ pid_t ret;
- if (pid != waitpid (pid, NULL, 0))
+ while ( (pid != (ret = waitpid (pid, NULL, 0))) &&
+ (EINTR == errno) ) ;
+ if (pid != ret)
+ {
+ LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "waitpid");
return GNUNET_SYSERR;
+ }
return GNUNET_OK;
#else
HANDLE h;
struct GNUNET_DISK_PipeHandle *opipe;
va_list ap;
- opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_NO, GNUNET_YES);
+ opipe = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES);
if (NULL == opipe)
return NULL;
va_start (ap, binary);