]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Make sure we remove pid file in monitor before manager exits.
authorNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:27:42 +0000 (20:27 +1000)
committerNeil Brown <neilb@suse.de>
Sat, 12 Jul 2008 10:27:42 +0000 (20:27 +1000)
monitor.c

index fda3fc01049f2504340d66b55f76a9f35550694b..46d5e0a00380672285a2667c140e8324cc545721 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -445,9 +445,9 @@ static int wait_and_act(struct supertype *container, int nowait)
                if (fd >= 0 || errno != EBUSY) {
                        /* OK, we are safe to leave */
                        dprintf("no arrays to monitor... exiting\n");
+                       remove_pidfile(container->devname);
                        exit_now = 1;
                        signal_manager();
-                       remove_pidfile(container->devname);
                        exit(0);
                }
        }