Skip to content

Commit

Permalink
disabled core dump on webOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Mar 7, 2024
1 parent 93b122b commit 76ed4d2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,27 @@
#include "util/path.h"
#include "logging.h"

#if defined(TARGET_WEBOS) && !defined(DEBUG)

#include <sys/resource.h>

#endif

static int settings_load(app_settings_t *settings);

int main(int argc, char *argv[]) {
#if TARGET_WEBOS
#ifdef TARGET_WEBOS
if (getenv("EGL_PLATFORM") == NULL) {
setenv("EGL_PLATFORM", "wayland", 0);
}
if (getenv("XDG_RUNTIME_DIR") == NULL) {
setenv("XDG_RUNTIME_DIR", "/tmp/xdg", 0);
}
#ifndef DEBUG
// Don't generate core dumps in release builds
struct rlimit rlim = {0, 0};
setrlimit(RLIMIT_CORE, &rlim);
#endif
#endif
app_t app;
int ret = app_init(&app, settings_load, argc, argv);
Expand Down

0 comments on commit 76ed4d2

Please sign in to comment.