2009-12-04 15:15:20 +01:00
|
|
|
---
|
|
|
|
src/killall5.c | 10 ++++++++--
|
|
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
|
2010-01-29 15:00:35 +01:00
|
|
|
--- src/killall5.c
|
2009-12-04 15:15:20 +01:00
|
|
|
+++ 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 */
|
2010-01-29 15:00:35 +01:00
|
|
|
+ p->ismdmon = (strncmp(buf, "/sbin/mdmon", 11) == 0);
|
2009-12-04 15:15:20 +01:00
|
|
|
+
|
|
|
|
/* 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;
|
|
|
|
}
|