if (n <= 0)
return 0;
if (strncmp(buf, "none", 4) == 0)
- return ~0ULL;
+ return MaxSector;
else
return strtoull(buf, NULL, 10);
}
dprintf("caught sigterm, all clean... exiting\n");
else
dprintf("no arrays to monitor... exiting\n");
- remove_pidfile(container->devname);
+ if (!sigterm)
+ /* On SIGTERM, someone (the take-over mdmon) will
+ * clean up
+ */
+ remove_pidfile(container->devname);
exit_now = 1;
signal_manager();
exit(0);