From: Andre Noll Date: Tue, 11 Dec 2007 16:42:24 +0000 (+0100) Subject: Fix SIGUSR1 handling on Solaris. X-Git-Tag: v0.3.0~59^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=02f5def4490f7e12987b0cf77989d42045627df5;ds=sidebyside Fix SIGUSR1 handling on Solaris. para_client dies the second time it receives SIGUSR1, because the signal action is restored to the default state once the signal handler has been called. --- diff --git a/command.c b/command.c index 68cc5ab5..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) {