X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/5865fcdd6370cef7d3a4997500a9a28f3114ad7f..c226b7c2fdd6cc4357337514b22c3042195ab091:/main.c diff --git a/main.c b/main.c index 900cd64e..87405579 100644 --- a/main.c +++ b/main.c @@ -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(); }