Ok this has changed recently. It is part of a new mechanism for detecting recursive core-dump, ie. dumps in the core dump handler. This changed in the commit below:
exec: make do_coredump() more resilient to recursive crashes
Change how we detect recursive dumps.
Currently we have a mechanism by which we try to compare pathnames of the
crashing process to the core_pattern path. This is broken for a dozen
reasons, and just doesn't work in any sort of robust way.
I'm replacing it with the use of a 0 RLIMIT_CORE value. Since helper apps
set RLIMIT_CORE to zero, we don't write out core files for any process
with that particular limit set. It the core_pattern is a pipe, any
non-zero limit is translated to RLIM_INFINITY.
This allows complete dumps to be captured, but prevents infinite recursion
in the event that the core_pattern process itself crashes.
The practicle upshot of which seems to be that setting the limit to 0 stops coredumps even for pipes. However, setting it to a very low value, say 1, will restore the original behaviour without allowing a real dump to occur where pipes are not in use.
Ok this has changed recently. It is part of a new mechanism for detecting recursive core-dump, ie. dumps in the core dump handler. This changed in the commit below:
commit 725eae32df77540 44809973034429a 47e6035158
Author: Neil Horman <email address hidden>
Date: Wed Sep 23 15:56:54 2009 -0700
exec: make do_coredump() more resilient to recursive crashes
Change how we detect recursive dumps.
Currently we have a mechanism by which we try to compare pathnames of the
crashing process to the core_pattern path. This is broken for a dozen
reasons, and just doesn't work in any sort of robust way.
I'm replacing it with the use of a 0 RLIMIT_CORE value. Since helper apps
set RLIMIT_CORE to zero, we don't write out core files for any process
with that particular limit set. It the core_pattern is a pipe, any
non-zero limit is translated to RLIM_INFINITY.
This allows complete dumps to be captured, but prevents infinite recursion
in the event that the core_pattern process itself crashes.
[<email address hidden>: coding-style fixes]
Signed-off-by: Neil Horman <email address hidden>
Reported-by: Earl Chew <email address hidden>
Cc: Oleg Nesterov <email address hidden>
Cc: Andi Kleen <email address hidden>
Cc: Alan Cox <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
The practicle upshot of which seems to be that setting the limit to 0 stops coredumps even for pipes. However, setting it to a very low value, say 1, will restore the original behaviour without allowing a real dump to occur where pipes are not in use.