unkillable process during core dump

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexander V. Lukyanov
Date: Monday, May 5, 2008 - 9:58 pm

Hello!

I have noticed that a process doing a core dump is unkillable.
Now imagine that there are many such processes and they are large.
An example:

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
int main() {
        calloc(1000000000,1);
        signal(SIGCLD,SIG_IGN);
        while(1) {
                if(fork()==0) {
                        raise(SIGABRT);
                        _exit(0);
                }
                sleep(10);
        }
        return 0;
}

Try with large enough ulimit -c and with sysctl kernel.core_uses_pid=0.
You kill the parent, but the children are still doing their core dumps.

-- 
   Alexander.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
unkillable process during core dump, Alexander V. Lukyanov, (Mon May 5, 9:58 pm)