during readconf_main() some expansion takes place already. */
/* Store the initial cwd before we change directories */
-initial_cwd = getcwd(NULL, 0);
+if ((initial_cwd = getcwd(NULL, 0)) == NULL)
+ {
+ perror("exim: can't get the current working directory");
+ exit(EXIT_FAILURE);
+ }
readconf_main();