putenv (GNUNET_OS_CONTROL_PIPE "=");
return;
}
+ if (pipe_fd >= FD_SETSIZE)
+ {
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "GNUNET_OS_CONTROL_PIPE `%s' contains garbage?\n", env_buf);
+ putenv (GNUNET_OS_CONTROL_PIPE "=");
+ return;
+ }
/* Gcc will issue a warning here. What to do with it? */
#if WINDOWS
control_pipe = GNUNET_DISK_get_handle_from_w32_handle ((HANDLE) pipe_fd);
{
childpipe_read = NULL;
childpipe_write = NULL;
+ childpipe_read_fd = -1;
}
if (NULL != pipe_stdout)
{
snprintf (fdbuf, 100, "%x", childpipe_read_fd);
setenv (GNUNET_OS_CONTROL_PIPE, fdbuf, 1);
}
+ else
+ unsetenv (GNUNET_OS_CONTROL_PIPE);
if (NULL != pipe_stdin)
{
GNUNET_break (0 == close (fd_stdin_write));