sysvinit/sysvinit-2.86-mdmon-no-kill.patch

41 lines
1.3 KiB
Diff

---
src/killall5.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- src/killall5.c
+++ src/killall5.c
@@ -62,6 +62,7 @@ typedef struct proc {
char isfuse; /* Provides FUSE filesystems */
char isudev; /* Is the uevent handler */
char nfs; /* Binary is loacted on NFS part. */
+ char ismdmon; /* Is an instance of /sbin/mdmon. */
struct proc *next; /* Pointer to next struct. */
} PROC;
@@ -609,6 +610,9 @@ int readproc()
/* Check for uevent handler */
p->isudev = (strncmp(buf, "/sbin/udevd", 11) == 0);
+ /* Check for mdmon */
+ p->ismdmon = (strncmp(buf, "/sbin/mdmon", 11) == 0);
+
/* Check for provider of FUSE filesystems */
p->isfuse = is_fuse(d->d_name);
@@ -947,11 +951,13 @@ int main(int argc, char **argv)
}
clear_mnt();
- /* Now kill all processes except init (pid 1), our session, and FUSE filesystems. */
+ /* Now kill all processes except init (pid 1), our session,
+ * FUSE filesystems and /sbin/mdmon */
sid = (int)getsid(0);
pid = (int)getpid();
for (p = plist; p; p = p->next) {
- if (p->pid == 1 || p->pid == pid || p->sid == sid || p->kernel || p->isfuse) {
+ if (p->pid == 1 || p->pid == pid || p->sid == sid || p->kernel
+ || p->isfuse || p->ismdmon) {
kill(p->pid, SIGCONT);
continue;
}