close(i);
open("/dev/null", O_RDWR);
}
+
+ set_nonblocking(STDIN_FILENO);
+
return start_daemon(STDIN_FILENO);
}
argv[0] = ".";
}
+ set_nonblocking(f_out);
+ if (f_in != f_out)
+ set_nonblocking(f_in);
+
flist = send_file_list(f_out,argc,argv);
if (!flist || flist->count == 0) {
exit_cleanup(0);
}
- set_nonblocking(f_out);
- if (f_in != f_out)
- set_nonblocking(f_in);
-
send_files(flist,f_out,f_in);
report(f_out);
io_flush();
if (f_in != f_out) close(f_out);
set_nonblocking(f_in);
+ set_nonblocking(recv_pipe[1]);
recv_files(f_in,flist,local_name,recv_pipe[1]);
report(f_in);
if (f_in != f_out) close(f_in);
set_nonblocking(f_out);
+ set_nonblocking(recv_pipe[0]);
io_start_buffering(f_out);
extern int cvs_exclude;
extern int am_sender;
+ set_nonblocking(f_out);
+ if (f_in != f_out)
+ set_nonblocking(f_in);
+
setup_protocol(f_out, f_in);
-
+
if (am_sender) {
recv_exclude_list(f_in);
if (cvs_exclude)
return -1;
}
+ set_nonblocking(res);
+
return res;
}
****************************************************************************/
int is_a_socket(int fd)
{
- int v,l;
- l = sizeof(int);
- return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
+ int v,l;
+ l = sizeof(int);
+ return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
}
if (fork()==0) {
close(s);
+ set_nonblocking(fd);
+
_exit(fn(fd));
}
*f_in = from_child_pipe[0];
*f_out = to_child_pipe[1];
+
+ set_nonblocking(*f_in);
+ set_nonblocking(*f_out);
return pid;
}