char *local_name = NULL;
cleanup_child_pid = pid;
- if (read_batch) {
- assert(am_sender == 0);
- } else {
+ if (!read_batch) {
set_nonblocking(f_in);
set_nonblocking(f_out);
}
exit_cleanup(status);
}
- if (argc == 0)
+ if (argc == 0 && !list_only)
list_only = 1;
if (!read_batch)
}
/* ... or no dest at all */
- if (!am_sender && argc == 0) {
+ if (!am_sender && argc == 0 && !list_only)
list_only = 1;
- }
pid = do_cmd(shell_cmd,shell_machine,shell_user,shell_path,
&f_in,&f_out);