Eric Blake <ebl...@redhat.com> writes: > On 07/25/2018 11:17 AM, Markus Armbruster wrote: > >>> >>> the output was produced by bash, which uses waitpid() - and therefore >>> the fact that bash reports the core dump even when no core file is >>> created is promising. >> >> Proof beats plausibility argument: >> >> $ cat wcordump.c > >> $ gcc -Wall -g -O wcordump.c >> $ (ulimit -c unlimited; ./a.out) >> sig 6 128 >> $ (ulimit -c 0; ./a.out) >> sig 6 0 > > Doesn't match my results: > > $ (ulimit -c 0; ./a.out) > sig 6 128 > > So, what's different between our two environments? > > kernel 4.17.7-100.fc27.x86_64
4.17.7-200.fc28.x86_64 > $ echo /proc/sys/kernel/core_* > /proc/sys/kernel/core_pattern /proc/sys/kernel/core_pipe_limit > /proc/sys/kernel/core_uses_pid > $ cat /proc/sys/kernel/core_* > |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e This is "core" on my development boxes (I'm a happy caveman). # cat /etc/sysctl.d/50-coredump.conf kernel.core_pattern=core > 0 > 1 > >> >> Looks like WCOREDUMP() does depend on my ulimit -c. > > Or worse, that its behavior is kernel/environment-sensitive. Looks like it.