X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=action.cpp;h=352efb40e30abc8202b4de6b14d866425c0888ec;hp=b7dfc582740d3b14e0e31ca73821fb44116c034b;hb=d4097e35584a9490c778d93b7667930a834481e7;hpb=0f5c2eabde69c66e8793171c878652184f9de5d8 diff --git a/action.cpp b/action.cpp index b7dfc58..352efb4 100644 --- a/action.cpp +++ b/action.cpp @@ -1976,9 +1976,11 @@ void EndpointAppPBX::action_execute(void) end_trace(); return; } +#if 0 argv[i++] = (char *)"/bin/sh"; argv[i++] = (char *)"-c"; argv[i++] = command; +#endif argv[i++] = command; if ((rparam = routeparam(e_action, PARAM_PARAM))) { argv[i++] = rparam->string_value; @@ -1999,7 +2001,7 @@ void EndpointAppPBX::action_execute(void) case 0: /* To be shure there are no zombies created double fork */ if ((pid2 = fork()) == 0) { - execve("/bin/sh", argv, environ); + execve(command, argv, environ); } else { /* Exit immediately and release the waiting parent. The subprocess falls to init because the parent died */