summaryrefslogtreecommitdiffstats
path: root/action.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2011-08-10 21:50:45 +0200
committerAndreas Eversberg2011-08-10 21:50:45 +0200
commit8b70a9a5c2071c587ab4016dcbbb8e4bbf6da181 (patch)
tree233c4b8de2cd93d70c725220b76708c9b88bd34f /action.cpp
parentMake install now works again. (Missing and required macro defintion) (diff)
downloadlcr-8b70a9a5c2071c587ab4016dcbbb8e4bbf6da181.tar.gz
lcr-8b70a9a5c2071c587ab4016dcbbb8e4bbf6da181.tar.xz
lcr-8b70a9a5c2071c587ab4016dcbbb8e4bbf6da181.zip
Fixed forking, to prevent LCR to run multiple times
Executing a script caused very weird behaviour, due to forking of LCR.
Diffstat (limited to 'action.cpp')
-rw-r--r--action.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/action.cpp b/action.cpp
index 352efb4..478406d 100644
--- a/action.cpp
+++ b/action.cpp
@@ -2003,10 +2003,8 @@ void EndpointAppPBX::action_execute(void)
if ((pid2 = fork()) == 0) {
execve(command, argv, environ);
}
- else {
- /* Exit immediately and release the waiting parent. The subprocess falls to init because the parent died */
- exit(0);
- }
+ /* Exit immediately and release the waiting parent. The subprocess falls to init because the parent died */
+ exit(0);
break;
default:
trace_header("ACTION execute", DIRECTION_NONE);