Use pipe2 when creating pipes if avaialble

This allows us to avoid marking the pipe as CLOEXEC in some cases,
saving a system call.
This commit is contained in:
ridiculousfish
2021-02-05 11:32:32 -08:00
parent 97f29b1f4d
commit b79ec0122a
3 changed files with 16 additions and 3 deletions

View File

@@ -107,6 +107,7 @@ check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H)
check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H)
check_include_file_cxx(termios.h HAVE_TERMIOS_H) # Needed for TIOCGWINSZ
check_cxx_symbol_exists(pipe2 unistd.h HAVE_PIPE2)
check_cxx_symbol_exists(wcscasecmp wchar.h HAVE_WCSCASECMP)
check_cxx_symbol_exists(wcsdup wchar.h HAVE_WCSDUP)
check_cxx_symbol_exists(wcslcpy wchar.h HAVE_WCSLCPY)