void *dso_private; /* dso per-thread status variable */
/* TODO per-thread mutex */
};
+
static DM_LIST_INIT(_thread_registry);
static DM_LIST_INIT(_thread_registry_unused);
sigemptyset(&set);
sigaddset(&set, SIGALRM);
pthread_sigmask(SIG_UNBLOCK, &set, &old);
+
return old;
}
* and a complete message is read. Must not block indefinitely.
*/
static int _client_read(struct dm_event_fifos *fifos,
- struct dm_event_daemon_message *msg)
+ struct dm_event_daemon_message *msg)
{
struct timeval t;
unsigned bytes = 0;
case -1:
log_sys_error("fork", "");
exit(EXIT_FAILURE);
-
case 0: /* Child */
break;
.server_path = DM_EVENT_FIFO_SERVER
};
time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
- //struct sys_log logdata = {DAEMON_NAME, LOG_DAEMON};
-
opterr = 0;
optind = 0;
/* Signal parent, letting them know we are ready to go. */
if (!_foreground)
kill(getppid(), SIGTERM);
+
log_notice("dmeventd ready for processing.");
_idle_since = time(NULL);
goto out; /* already reported */
log_error("Device #%d of %s array, %s, has failed.",
- (int)(d - status->dev_health),
- status->raid_type, device);
+ (int)(d - status->dev_health),
+ status->raid_type, device);
state->failed = 1;
if (!dmeventd_lvm2_run_with_lock(state->cmd_lvscan))
if (!lv_snapshot_percent(lv, &percent))
return_0;
if (!(DM_PERCENT_0 < percent && percent <= DM_PERCENT_100) || percent <= policy_threshold)
- return 1; /* nothing to do */
+ return 1; /* nothing to do */
}
lp->extents = policy_amount;