[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11674 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11674 - gnunet/src/util |
Date: |
Fri, 11 Jun 2010 23:29:31 +0200 |
Author: grothoff
Date: 2010-06-11 23:29:31 +0200 (Fri, 11 Jun 2010)
New Revision: 11674
Modified:
gnunet/src/util/os_priority.c
Log:
error checking
Modified: gnunet/src/util/os_priority.c
===================================================================
--- gnunet/src/util/os_priority.c 2010-06-11 19:10:58 UTC (rev 11673)
+++ gnunet/src/util/os_priority.c 2010-06-11 21:29:31 UTC (rev 11674)
@@ -233,19 +233,20 @@
if (pipe_stdout != NULL)
{
- dup2(fd_stdout_write, 1);
- close (fd_stdout_write);
- close (fd_stdout_read);
+ GNUNET_break (0 == close (fd_stdout_read));
+ if (-1 == dup2(fd_stdout_write, 1))
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "dup2");
+ GNUNET_break (0 == close (fd_stdout_write));
}
if (pipe_stdin != NULL)
{
- dup2(fd_stdin_read, 0);
- close (fd_stdin_read);
- close (fd_stdin_write);
+ GNUNET_break (0 == close (fd_stdin_write));
+ if (-1 == dup2(fd_stdin_read, 0))
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "dup2");
+ GNUNET_break (0 == close (fd_stdin_read));
}
-
execvp (filename, argv);
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "execvp", filename);
_exit (1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11674 - gnunet/src/util,
gnunet <=