diff options
author | Neil Brown <neilb@suse.de> | 2008-05-27 01:18:41 +0200 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-27 01:18:41 +0200 |
commit | e0d6609fe6b0fe6a74705d1f1c1cf4a0d3a71db8 (patch) | |
tree | 4e1a2f6c44d2ae2a943de26178edab3462e723c9 /managemon.c | |
parent | Remove supertype->devfd (diff) | |
download | mdadm-e0d6609fe6b0fe6a74705d1f1c1cf4a0d3a71db8.tar.xz mdadm-e0d6609fe6b0fe6a74705d1f1c1cf4a0d3a71db8.zip |
Exit when there are no more arrays to manage.
Diffstat (limited to 'managemon.c')
-rw-r--r-- | managemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c index aa10a993..971dcd1d 100644 --- a/managemon.c +++ b/managemon.c @@ -382,6 +382,8 @@ void wake_me(int sig) woke = 1; } +int exit_now = 0; +int manager_ready = 0; void do_manager(struct supertype *container) { struct mdstat_ent *mdstat; @@ -395,6 +397,9 @@ void do_manager(struct supertype *container) do { woke = 0; + if (exit_now) + exit(0); + mdstat = mdstat_read(1, 0); manage(mdstat, container); @@ -405,6 +410,7 @@ void do_manager(struct supertype *container) remove_old(); + manager_ready = 1; sigprocmask(SIG_SETMASK, &block, &orig); if (woke == 0) mdstat_wait_fd(container->sock, &orig); |