diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-17 12:06:07 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-18 22:29:56 -0400 |
commit | 206fc4b284afe68b1a0b7d776212ee81c12abf64 (patch) | |
tree | 1414b843ee5ecfabca43b8063b8932aa3db52d2b /src | |
parent | 622a0f628cee51851ad00856f9efddedf0799edb (diff) |
systemd: warn when setrlimit fails
This should make it easier to figure things out.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/main.c b/src/core/main.c index 02324d325e..3f4fa74fed 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1505,7 +1505,8 @@ int main(int argc, char *argv[]) { if (getpid() == 1) { /* Don't limit the core dump size, so that coredump handlers such as systemd-coredump (which honour the limit) * will process core dumps for system services by default. */ - (void) setrlimit(RLIMIT_CORE, &RLIMIT_MAKE_CONST(RLIM_INFINITY)); + if (setrlimit(RLIMIT_CORE, &RLIMIT_MAKE_CONST(RLIM_INFINITY)) < 0) + log_warning_errno(errno, "Failed to set RLIMIT_CORE: %m"); /* But at the same time, turn off the core_pattern logic by default, so that no coredumps are stored * until the systemd-coredump tool is enabled via sysctl. */ |