Skip to content

Commit

Permalink
Merge pull request #665 from nirgal/no_sigwaitinfo
Browse files Browse the repository at this point in the history
Fixed compilation when there's no sigwaitinfo
  • Loading branch information
oetiker committed Oct 27, 2015
2 parents 7643374 + 5209e55 commit b6645ad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/rrd_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,16 @@ static void sig_common (const char *sig) /* {{{ */

static void* signal_receiver (void UNUSED(*args))
{
siginfo_t signal_info;
int status;

while (1)
{
#if defined(HAVE_SIGWAITINFO)
siginfo_t signal_info;
status = sigwaitinfo(&signal_set, &signal_info);
#elif defined(HAVE_SIGWAIT)
status = -1;
if (sigwait(signal_set, &status) < 0 ){
if (sigwait(&signal_set, &status) < 0 ){
status = -1;
}
#else
Expand Down Expand Up @@ -408,11 +408,18 @@ static void* signal_receiver (void UNUSED(*args))
break;

default:
#if defined(HAVE_SIGWAITINFO)
RRDD_LOG(LOG_NOTICE,
"%s: Signal %d was received from process %u.\n",
__func__,
status,
signal_info.si_pid);
#else
RRDD_LOG(LOG_NOTICE,
"%s: Signal %d was received.\n",
__func__,
status);
#endif
}
}

Expand Down

0 comments on commit b6645ad

Please sign in to comment.