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
$ 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
0
1
Looks like WCOREDUMP() does depend on my ulimit -c.
Or worse, that its behavior is kernel/environment-sensitive.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org