notaz.gp2x.de
/
ginge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8424752
)
make forced_exit work regardless of loader name
author
notaz
<notasas@gmail.com>
Sun, 8 Nov 2015 16:35:20 +0000
(18:35 +0200)
committer
notaz
<notasas@gmail.com>
Sun, 8 Nov 2015 16:35:20 +0000
(18:35 +0200)
loader/host.c
patch
|
blob
|
blame
|
history
diff --git
a/loader/host.c
b/loader/host.c
index
546839c
..
e1e9cc8
100644
(file)
--- 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.
// 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);
usleep(300000);
- system("killall -9 ginge_sloader");
+ snprintf(cmd, sizeof(cmd), "killall -9 %s", g_argv[0]);
+ system(cmd);
exit(1);
}
exit(1);
}