diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:43 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:43 +0200 |
commit | 295646b3d59c7d8d8c389ff320b30e61552ba331 (patch) | |
tree | 150b20b04a0c112123e35cbca62e40ac7d525918 /mdstat.c | |
parent | ping_manager() to prevent 'add' before 'remove' completes (diff) | |
download | mdadm-295646b3d59c7d8d8c389ff320b30e61552ba331.tar.xz mdadm-295646b3d59c7d8d8c389ff320b30e61552ba331.zip |
mdmon: recreate socket/pid file on SIGHUP
Allow mdmon to start while /var/run/mdadm is readonly. Later a SIGHUP
can trigger mdmon to drop its pid and socket once /var/run/mdadm is
writable. Of course one needs the pid to send a HUP, that can be stored
in a distribution specific rw-init directory... For now, rely on a
killall -HUP mdmon to get the files dumped.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdstat.c')
-rw-r--r-- | mdstat.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -280,7 +280,8 @@ void mdstat_wait_fd(int fd, const sigset_t *sigmask) FD_ZERO(&rfds); if (mdstat_fd >= 0) FD_SET(mdstat_fd, &fds); - FD_SET(fd, &rfds); + if (fd >= 0) + FD_SET(fd, &rfds); if (mdstat_fd > maxfd) maxfd = mdstat_fd; |