* Paul Wise <p...@debian.org>, 2019-03-19, 12:12:
You can use %c in core_pattern to get the soft limit of the crashing process.

(Hmm, it's not documented what's the value you get when there's no limit...)

I got 0xffffffffffffffff on amd64 when it was set to unlimited,

That's a bit ugly, but convenient, because you could use this number directly for "head -c". (In contrast, you get the string "unlimited" in /proc/<pid>/limits.)

Not sure how to get RLIM_INFINITY in shell though but

I don't think you can.

The fundamental problem is that glibc's RLIM_INFINITY is not necessarily the same as kernel's RLIM_INFINITY: it could be 32-bit on glibc side and 64-bit on kernel side, or other way round. (The getrlimit(2) man page doesn't document this correctly...)

Now I wonder how to add %c to the core_pattern and also deal with old versions of Linux.

%c and argument splitting were added in the same commit:
https://github.com/torvalds/linux/commit/74aadce986052f20088c2678f589ea0e8d3a4b59
So corekeeper wouldn't work on kernels without %c anyway.

--
Jakub Wilk

Reply via email to