path: root/
diff options
authorGlenn Strauss <>2016-12-17 17:58:34 -0500
committerGlenn Strauss <>2016-12-17 18:07:42 -0500
commit22ca2778a8cab9040a7f0809169d6076027d21bf (patch)
treefad51b37ca6a76eadb923c932aa23640f786e221 /
parent9619d643ff27085e5d59d14a3c2abe4864bdaa2d (diff)
[build] check for pipe2() at configure time
Lack of pipe2() on relic Unix as well as missing on Mac OSX is likely one reason why threaded web servers such as nginx choose not to support CGI except via an external service to the process. Without pipe2(), race conditions exist and it is not safe for a threaded server to use pipe() and fork() when the server also does not want to potentially leak open file descriptors to various unrelated CGI scripts.
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/ b/
index f6912606..211fb741 100644
--- a/
+++ b/
@@ -772,7 +772,7 @@ AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop inet_pton issetugid memset mmap
gethostbyname poll epoll_ctl getrlimit chroot \
getuid select signal pathconf madvise posix_fadvise posix_madvise \
writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r \
- memset_s explicit_bzero clock_gettime \
+ memset_s explicit_bzero clock_gettime pipe2 \
getentropy arc4random_buf jrand48 srandom getloadavg])
AC_CHECK_FUNC([getrandom], AC_DEFINE([HAVE_GETRANDOM], [1], [getrandom]))