X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/73141a5abf8a3699249e401522fe9174b5aa8a1b..9dea8f12c7617bcee02319adbb51353b6b35b2f8:/src/src/child.c diff --git a/src/src/child.c b/src/src/child.c index 948e0d669..4a262d623 100644 --- a/src/src/child.c +++ b/src/src/child.c @@ -3,7 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2015 */ -/* Copyright (c) The Exim Maintainers 2020 */ +/* Copyright (c) The Exim Maintainers 2020 - 2021 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -108,7 +108,17 @@ if (!minimal) else { if (debug_selector != 0) + { argv[n++] = string_sprintf("-d=0x%x", debug_selector); + if (debug_fd > 2) + { + int flags = fcntl(debug_fd, F_GETFD); + if (flags != -1) (void)fcntl(debug_fd, F_SETFD, flags & ~FD_CLOEXEC); + close(2); + dup2(debug_fd, 2); + close(debug_fd); + } + } } DEBUG(D_any) {