From 7d4e5f8112e69eee72b501b34d47994badf9ea2c Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 8 Nov 2015 18:35:20 +0200 Subject: [PATCH] make forced_exit work regardless of loader name --- loader/host.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/loader/host.c b/loader/host.c index 546839c..e1e9cc8 100644 --- a/loader/host.c +++ b/loader/host.c @@ -48,9 +48,15 @@ void host_forced_exit(void) // exit() might not be enough because loader and app data is out of sync, // and other threads (which are really processes on this old glibc used) // might not exit properly. - system("killall ginge_sloader"); + char cmd[64]; + + printf("forced exit...\n"); + + snprintf(cmd, sizeof(cmd), "killall %s", g_argv[0]); + system(cmd); usleep(300000); - system("killall -9 ginge_sloader"); + snprintf(cmd, sizeof(cmd), "killall -9 %s", g_argv[0]); + system(cmd); exit(1); } -- 2.39.5