X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ff8b29b8c62f377ede40fbf0cbbaa428bd8df60a..a6801c397732a55d2f9f477a360db6fc09bb1c3d:/socket.c diff --git a/socket.c b/socket.c index 5ee31f6d..3c876ed0 100644 --- a/socket.c +++ b/socket.c @@ -120,7 +120,7 @@ void start_accept_loop(int port, int (*fn)(int )) { int s; - signal(SIGCLD, SIG_IGN); + signal(SIGCHLD, SIG_IGN); /* open an incoming socket */ s = open_socket_in(SOCK_STREAM, port); @@ -216,6 +216,8 @@ set user socket options void set_socket_options(int fd, char *options) { char *tok; + if (!options || !*options) return; + options = strdup(options); if (!options) out_of_memory("set_socket_options");