diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-02-11 17:42:37 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-03-26 17:57:42 +0100 |
| commit | f03e6eff2f491fbf1a38b36d46c0fe2fdd3e6886 (patch) | |
| tree | 91c7edbe4864fe80d17d7754d7e833dfafb75ef3 /config-daemon.ac | |
| parent | 92205bab4dcf25a9c4dbe08daf0e53c6e608ca3e (diff) | |
daemon: Use ‘close_range’ where available.
* nix/libutil/util.cc (closeMostFDs) [HAVE_CLOSE_RANGE]: Use
‘close_range’ when ‘exceptions’ is empty.
* config-daemon.ac: Check for <linux/close_range.h> and the
‘close_range’ symbol.
Change-Id: I12fa3bde58b003fcce5ea5a1fee1dcf9a92c0359
Diffstat (limited to 'config-daemon.ac')
| -rw-r--r-- | config-daemon.ac | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/config-daemon.ac b/config-daemon.ac index 6731c68bc39..4e949bc88a3 100644 --- a/config-daemon.ac +++ b/config-daemon.ac | |||
| @@ -78,7 +78,8 @@ if test "x$guix_build_daemon" = "xyes"; then | |||
| 78 | 78 | ||
| 79 | dnl Chroot support. | 79 | dnl Chroot support. |
| 80 | AC_CHECK_FUNCS([chroot unshare]) | 80 | AC_CHECK_FUNCS([chroot unshare]) |
| 81 | AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h sys/syscall.h]) | 81 | AC_CHECK_HEADERS([sched.h sys/param.h sys/mount.h sys/syscall.h \ |
| 82 | linux/close_range.h]) | ||
| 82 | 83 | ||
| 83 | if test "x$ac_cv_func_chroot" != "xyes"; then | 84 | if test "x$ac_cv_func_chroot" != "xyes"; then |
| 84 | AC_MSG_ERROR(['chroot' function missing, bailing out]) | 85 | AC_MSG_ERROR(['chroot' function missing, bailing out]) |
| @@ -95,7 +96,7 @@ if test "x$guix_build_daemon" = "xyes"; then | |||
| 95 | dnl strsignal: for error reporting. | 96 | dnl strsignal: for error reporting. |
| 96 | dnl statx: fine-grain 'stat' call, new in glibc 2.28. | 97 | dnl statx: fine-grain 'stat' call, new in glibc 2.28. |
| 97 | AC_CHECK_FUNCS([lutimes lchown posix_fallocate sched_setaffinity \ | 98 | AC_CHECK_FUNCS([lutimes lchown posix_fallocate sched_setaffinity \ |
| 98 | statvfs nanosleep strsignal statx]) | 99 | statvfs nanosleep strsignal statx close_range]) |
| 99 | 100 | ||
| 100 | dnl Check for <locale>. | 101 | dnl Check for <locale>. |
| 101 | AC_LANG_PUSH(C++) | 102 | AC_LANG_PUSH(C++) |
