X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=d35113a500f0a2b78ce853996db9413bafd0be4f;hp=aed9e6a0a34ab94ea6fce7b5708ac0b6e228efd2;hb=02f5def4490f7e12987b0cf77989d42045627df5;hpb=55b45ec9ba3ef54395b3d22b3d00404f35e636a3 diff --git a/command.c b/command.c index aed9e6a0..d35113a5 100644 --- a/command.c +++ b/command.c @@ -40,8 +40,16 @@ static unsigned char rc4_buf[2 * RC4_KEY_LEN]; extern struct misc_meta_data *mmd; extern struct sender senders[]; -static void dummy(__a_unused int s) -{} +static void dummy(int s) +{ + /* + * At least on Solaris, SIGUSR1 is one-shot, i.e. the signal action is + * restored to the default state once the signal handler has been + * called. + */ + if (s == SIGUSR1) + signal(SIGUSR1, dummy); +} static void mmd_dup(struct misc_meta_data *new_mmd) { @@ -696,7 +704,6 @@ int handle_connect(int fd, const char *peername) signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); signal(SIGHUP, SIG_DFL); - signal(SIGUSR1, SIG_IGN); /* we need a blocking fd here as recv() might return EAGAIN otherwise. */ ret = mark_fd_blocking(fd);