X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=fee817b005f69c7325760238725700d04046a25e;hp=68cc5ab55f7c8da0362bb1ae9aa018014a97ede9;hb=9ae0041ae0dd073657862c4abdf3886a66035ee9;hpb=b46dd218f90646441998f975c9b5515a5521c9d5 diff --git a/command.c b/command.c index 68cc5ab5..fee817b0 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) { @@ -301,7 +309,7 @@ int com_version(int fd, int argc, __a_unused char * const * argv) return -E_COMMAND_SYNTAX; return send_buffer(fd, VERSION_TEXT("server") "built: " BUILD_DATE "\n" - SYSTEM ", " CC_VERSION "\n" + UNAME_RS ", " CC_VERSION "\n" ); } @@ -796,9 +804,9 @@ int handle_connect(int fd, const char *peername) goto out; } err_out: - send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret)); + send_va_buffer(fd, "%s\n", para_strerror(-ret)); net_err: - PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-ret)); + PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); ret = EXIT_FAILURE; out: free(command);