summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-util-unix.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-12-03 16:04:56 +0000
committerSimon McVittie <smcv@collabora.com>2018-12-11 12:47:22 +0000
commit64f94d3f5bc4e1229abc5a9ec7ae089b3b259719 (patch)
tree08b6e3007bafb63660d2c78300d7f7121d26334f /dbus/dbus-sysdeps-util-unix.c
parentc3d15a9eade40627a8ea5ded95068c6d2294cdf5 (diff)
downloaddbus-64f94d3f5bc4e1229abc5a9ec7ae089b3b259719.tar.gz
Move _dbus_disable_crash_handling() back into test/ directory
It's only used in test code. We have to put it in its own translation unit with no non-libc dependencies so that we can compile a copy of it without AddressSanitizer support, because in a subsequent commit we will special-case test-segfault to be compiled without using AddressSanitizer, which would make linking to an AddressSanitizer-instrumented libdbus fail. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus/dbus-sysdeps-util-unix.c')
-rw-r--r--dbus/dbus-sysdeps-util-unix.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
index 3e74cf17..0f6106aa 100644
--- a/dbus/dbus-sysdeps-util-unix.c
+++ b/dbus/dbus-sysdeps-util-unix.c
@@ -1587,28 +1587,3 @@ _dbus_daemon_report_stopping (void)
sd_notify (0, "STOPPING=1");
#endif
}
-
-/**
- * Try to disable core dumps and similar special crash handling.
- */
-void
-_dbus_disable_crash_handling (void)
-{
-#ifdef HAVE_SETRLIMIT
- /* No core dumps please, we know we crashed. */
- struct rlimit r = { 0, };
-
- getrlimit (RLIMIT_CORE, &r);
- r.rlim_cur = 0;
- setrlimit (RLIMIT_CORE, &r);
-#endif
-
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
- /* Really, no core dumps please. On Linux, if core_pattern is
- * set to a pipe (for abrt/apport/corekeeper/etc.), RLIMIT_CORE of 0
- * is ignored (deliberately, so people can debug init(8) and other
- * early stuff); but Linux has PR_SET_DUMPABLE, so we can avoid core
- * dumps anyway. */
- prctl (PR_SET_DUMPABLE, 0, 0, 0, 0);
-#endif
-}