diff options
author | LRN <lrn1986@gmail.com> | 2013-02-15 11:21:30 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-02-15 11:21:30 +0000 |
commit | 8d588e5424304b10915500d1098be94b4fd63d56 (patch) | |
tree | 936f19037c61d393a95c4bb0bf65960feb00569a /src/util | |
parent | 88c7851a4b8fb70bc988c3abae4bf2028d9fde8b (diff) | |
download | gnunet-8d588e5424304b10915500d1098be94b4fd63d56.tar.gz gnunet-8d588e5424304b10915500d1098be94b4fd63d56.zip |
Detect bad control pipes earlier
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/os_priority.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index e4bb41cf5..983da42b1 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -151,6 +151,13 @@ GNUNET_OS_install_parent_control_handler (void *cls, | |||
151 | putenv (GNUNET_OS_CONTROL_PIPE "="); | 151 | putenv (GNUNET_OS_CONTROL_PIPE "="); |
152 | return; | 152 | return; |
153 | } | 153 | } |
154 | if (pipe_fd >= FD_SETSIZE) | ||
155 | { | ||
156 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
157 | "GNUNET_OS_CONTROL_PIPE `%s' contains garbage?\n", env_buf); | ||
158 | putenv (GNUNET_OS_CONTROL_PIPE "="); | ||
159 | return; | ||
160 | } | ||
154 | /* Gcc will issue a warning here. What to do with it? */ | 161 | /* Gcc will issue a warning here. What to do with it? */ |
155 | #if WINDOWS | 162 | #if WINDOWS |
156 | control_pipe = GNUNET_DISK_get_handle_from_w32_handle ((HANDLE) pipe_fd); | 163 | control_pipe = GNUNET_DISK_get_handle_from_w32_handle ((HANDLE) pipe_fd); |