forked from drath/libratbag
ratbagd: disable coredumps in ratbagd.devel
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
f62940c1e5
commit
5a40d93a30
@@ -448,7 +448,8 @@ executable('ratbagd.devel',
|
||||
dependencies : deps_ratbagd,
|
||||
include_directories : include_directories('src'),
|
||||
install : false,
|
||||
c_args : '-DRATBAG_DBUS_INTERFACE="ratbag_devel1_@0@"'.format(ratbagd_sha),
|
||||
c_args : ['-DRATBAG_DBUS_INTERFACE="ratbag_devel1_@0@"'.format(ratbagd_sha),
|
||||
'-DDISABLE_COREDUMP=1'],
|
||||
)
|
||||
|
||||
config_ratbagd_devel = configuration_data()
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <libudev.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
#include <systemd/sd-bus.h>
|
||||
#include <systemd/sd-event.h>
|
||||
#include "ratbagd.h"
|
||||
@@ -523,6 +524,12 @@ int main(int argc, char *argv[])
|
||||
struct ratbagd *ctx = NULL;
|
||||
int r;
|
||||
|
||||
#if DISABLE_COREDUMP
|
||||
const struct rlimit corelimit = { 0, 0 };
|
||||
|
||||
setrlimit(RLIMIT_CORE, &corelimit);
|
||||
#endif
|
||||
|
||||
if (argc > 1) {
|
||||
if (streq(argv[1], "--verbose=raw")) {
|
||||
verbose_raw = true;
|
||||
|
||||
Reference in New Issue
Block a user