X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=d35113a500f0a2b78ce853996db9413bafd0be4f;hp=379cc4d90044659fa893b22781b4f685f8534bac;hb=d2765e8ef91706453cdc6ed3fde89baf56ac718a;hpb=d2e164526bed7f523043b7e4ec5bd282d5bc6f19 diff --git a/command.c b/command.c index 379cc4d9..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) { @@ -108,7 +116,7 @@ static char *get_status(struct misc_meta_data *nmmd) flags = vss_get_status_flags(nmmd->vss_status_flags); if (nmmd->size) { /* parent currently has an audio file open */ localtime_r(&nmmd->mtime, &mtime_tm); - strftime(mtime, 29, "%a %b %d %Y", &mtime_tm); + strftime(mtime, 29, "%b %d %Y", &mtime_tm); } gettimeofday(&now, NULL); ret = make_message( @@ -278,7 +286,7 @@ int com_si(int fd, int argc, __a_unused char * const * argv) "supported senders: %s\n" "%s", ut, mmd->num_played, - getppid(), + (int)getppid(), mmd->active_connections, mmd->num_commands, mmd->num_connects, @@ -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);