[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37986 - libmicrohttpd/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37986 - libmicrohttpd/src/microhttpd |
Date: |
Fri, 23 Sep 2016 16:06:50 +0200 |
Author: grothoff
Date: 2016-09-23 16:06:50 +0200 (Fri, 23 Sep 2016)
New Revision: 37986
Modified:
libmicrohttpd/src/microhttpd/mhd_itc.h
Log:
-check close() return value
Modified: libmicrohttpd/src/microhttpd/mhd_itc.h
===================================================================
--- libmicrohttpd/src/microhttpd/mhd_itc.h 2016-09-23 13:14:25 UTC (rev
37985)
+++ libmicrohttpd/src/microhttpd/mhd_itc.h 2016-09-23 14:06:50 UTC (rev
37986)
@@ -86,7 +86,9 @@
* Close any FDs of the pipe (non-W32)
*/
#define MHD_pipe_close_(pip) do { \
- close (pip.event_fd); \
+ if ( (0 != close (pip.event_fd)) && \
+ (EBADF == errno) ) \
+ MHD_PANIC (_("close failed")); \
} while (0)
/**
@@ -167,8 +169,12 @@
* Close any FDs of the pipe (non-W32)
*/
#define MHD_pipe_close_(pip) do { \
- close (pip.fd[0]); \
- close (pip.fd[1]); \
+ if ( (0 != close (pip.fd[0])) && \
+ (EBADF == errno) ) \
+ MHD_PANIC (_("close failed")); \
+ if ( (0 != close (pip.fd[1])) && \
+ (EBADF == errno) ) \
+ MHD_PANIC (_("close failed")); \
} while (0)
/**
@@ -239,8 +245,8 @@
* Close emulated pipe FDs
*/
#define MHD_pipe_close_(fd) do { \
- MHD_socket_close_(pip.fd[0]); \
- MHD_socket_close_(pip.fd[1]); \
+ MHD_socket_close_ (pip.fd[0]); \
+ MHD_socket_close_ (pip.fd[1]); \
} while (0)
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37986 - libmicrohttpd/src/microhttpd,
gnunet <=