From aa17e6fd6b10b6e34c39778607baacf434a14c68 Mon Sep 17 00:00:00 2001 From: Frederic Turgis Date: Tue, 30 Aug 2011 23:22:23 +0200 Subject: [PATCH] PR13142: Stopping script execution on Android (ARM) does not unload kernel module --- runtime/staprun/mainloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c index 7994fb319..b91f571ad 100644 --- a/runtime/staprun/mainloop.c +++ b/runtime/staprun/mainloop.c @@ -316,7 +316,7 @@ void system_cmd(char *cmd) if ((pid = fork()) < 0) { _perr("fork"); } else if (pid == 0) { - if (execl("/bin/sh", "sh", "-c", cmd, NULL) < 0) + if (execlp("sh", "sh", "-c", cmd, NULL) < 0) perr("%s", cmd); _exit(1); } @@ -505,7 +505,7 @@ void cleanup_and_exit(int detach, int rc) (verbose >= 2) ? "-v" : "", modname); if (rc >= 1) { - execl("/bin/sh", "sh", "-c", cmd, NULL); + execlp("sh", "sh", "-c", cmd, NULL); /* should not return */ perror(staprun); _exit(-1); -- 2.43.5