X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1f0610ef8259aa11df8d25e48c06d19d715bff23..9ef53907149a591ec9302a929d0fa319f348b8d9:/main.c diff --git a/main.c b/main.c index 900cd64e..c46de2a1 100644 --- a/main.c +++ b/main.c @@ -592,7 +592,7 @@ int main(int argc,char *argv[]) carried across */ orig_umask = (int)umask(0); - if (!parse_arguments(argc, argv)) { + if (!parse_arguments(argc, argv, 1)) { exit_cleanup(RERR_SYNTAX); } @@ -606,6 +606,12 @@ int main(int argc,char *argv[]) signal(SIGHUP,SIGNAL_CAST sig_int); signal(SIGTERM,SIGNAL_CAST sig_int); + /* Initialize push_dir here because on some old systems getcwd + (implemented by forking "pwd" and reading its output) doesn't + work when there are other child processes. Also, on all systems + that implement getcwd that way "pwd" can't be found after chroot. */ + push_dir(NULL,0); + if (am_daemon) { return daemon_main(); }