From: Neil Brown Date: Sat, 12 Jul 2008 10:27:42 +0000 (+1000) Subject: Make sure we remove pid file in monitor before manager exits. X-Git-Tag: mdadm-3.0-devel1~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=207aac36d50e7d2c48766667bf4bf42c08bc0ec2;p=thirdparty%2Fmdadm.git Make sure we remove pid file in monitor before manager exits. --- diff --git a/monitor.c b/monitor.c index fda3fc01..46d5e0a0 100644 --- 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); } }