From: Frederic Turgis Date: Tue, 30 Aug 2011 21:22:23 +0000 (+0200) Subject: PR13142: Stopping script execution on Android (ARM) does not unload kernel module X-Git-Tag: release-1.7~153^2~81^2 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=aa17e6fd6b10b6e34c39778607baacf434a14c68;p=systemtap.git PR13142: Stopping script execution on Android (ARM) does not unload kernel module --- 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);