From: Jeremy Harris Date: Sat, 28 Oct 2017 14:09:05 +0000 (+0100) Subject: Do not exit when cwd has no name. Bug 2078 X-Git-Tag: exim-4_90_RC2~26 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/cd328be98eb5bdda73316eaf95d9d6a617c7df7d?ds=sidebyside Do not exit when cwd has no name. Bug 2078 --- diff --git a/src/src/exim.c b/src/src/exim.c index c12b95477..7dd084534 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3793,12 +3793,9 @@ NOTE: immediatly after opening the configuration file we change the working directory to "/"! Later we change to $spool_directory. We do it there, because during readconf_main() some expansion takes place already. */ -/* Store the initial cwd before we change directories */ -if ((initial_cwd = os_getcwd(NULL, 0)) == NULL) - { - perror("exim: can't get the current working directory"); - exit(EXIT_FAILURE); - } +/* Store the initial cwd before we change directories. Can be NULL if the +dir has already been unlinked. */ +initial_cwd = os_getcwd(NULL, 0); /* checking: -be[m] expansion test -