From 1ed3f38758ff23dabfa3f67e2a02ff98d9d0fea8 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 27 May 2008 09:18:39 +1000 Subject: Remove stopped arrays. When an array becomes inactive, clean up and forget it. This involves signalling the manager. --- mdstat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdstat.c') diff --git a/mdstat.c b/mdstat.c index a65e7c3a..040df150 100644 --- a/mdstat.c +++ b/mdstat.c @@ -272,7 +272,7 @@ void mdstat_wait(int seconds) select(mdstat_fd >2 ? mdstat_fd+1:3, NULL, NULL, &fds, &tm); } -void mdstat_wait_fd(int fd) +void mdstat_wait_fd(int fd, const sigset_t *sigmask) { fd_set fds, rfds; @@ -282,7 +282,8 @@ void mdstat_wait_fd(int fd) FD_SET(mdstat_fd, &fds); FD_SET(fd, &rfds); - select(mdstat_fd >2 ? mdstat_fd+1:3, &rfds, NULL, &fds, NULL); + pselect(mdstat_fd >2 ? mdstat_fd+1:3, &rfds, NULL, &fds, + NULL, sigmask); } int mddev_busy(int devnum) -- cgit v1.2.3