if ((pid=do_fork()) == 0) {
+ close(recv_pipe[0]);
recv_files(f_in,flist,local_name,recv_pipe[1]);
if (am_daemon) report(-1);
exit_cleanup(0);
}
+ close(recv_pipe[1]);
generate_files(f_out,flist,local_name,recv_pipe[0]);
waitpid(pid, &status, 0);
argv += optind;
optind = 0;
- if (argc < 1) {
- usage(FERROR);
- exit(1);
- }
-
signal(SIGCHLD,SIG_IGN);
signal(SIGINT,SIGNAL_CAST sig_int);
signal(SIGPIPE,SIGNAL_CAST sig_int);
return daemon_main();
}
+ if (argc < 1) {
+ usage(FERROR);
+ exit(1);
+ }
+
if (dry_run)
verbose = MAX(verbose,1);