summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-04-14 14:59:24 +1000
committerNeilBrown <neilb@suse.de>2009-04-14 14:59:24 +1000
commit2800528713cd32a4d12d7e17c14eba34eb8a4ec2 (patch)
treef80c016a09255e2fc3d5c3bab864ca0be46fa588 /monitor.c
parentc256924e52249b52bad42963176c42601f1a08f4 (diff)
downloadmdadm-2800528713cd32a4d12d7e17c14eba34eb8a4ec2.tar.gz
mdadm-2800528713cd32a4d12d7e17c14eba34eb8a4ec2.tar.xz
mdadm-2800528713cd32a4d12d7e17c14eba34eb8a4ec2.zip
Wait for POLLPRI on /proc or /sys files.
From 2.6.30, /proc/mounts and various /sys files will probably always returns 'readable' to select, so we will need to wait on POLLPRI to get the 'new data is available' signal. When using select, this corresponds to an 'exception', so adjust calls to select accordingly. In one case we sometimes wait on a socket and sometime on /proc/mounts, so we need to test which. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 3388d31..66fea80 100644
--- a/monitor.c
+++ b/monitor.c
@@ -498,7 +498,7 @@ static int wait_and_act(struct supertype *container, int nowait)
sigprocmask(SIG_UNBLOCK, NULL, &set);
sigdelset(&set, SIGUSR1);
monitor_loop_cnt |= 1;
- rv = pselect(maxfd+1, &rfds, NULL, NULL, NULL, &set);
+ rv = pselect(maxfd+1, NULL, NULL, &rfds, NULL, &set);
monitor_loop_cnt += 1;
if (rv == -1 && errno == EINTR)
rv = 0;