summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbCommands.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index afa7984..4247820 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -154,9 +154,12 @@ int ExecuteCmd::run() {
154 // remove last number of display and add screen num 154 // remove last number of display and add screen num
155 displaystring.erase(displaystring.size()-1); 155 displaystring.erase(displaystring.size()-1);
156 displaystring += intbuff; 156 displaystring += intbuff;
157
158 std::string exec_cmd = "exec " + m_cmd;
159
157 setsid(); 160 setsid();
158 putenv(const_cast<char *>(displaystring.c_str())); 161 putenv(const_cast<char *>(displaystring.c_str()));
159 execl(shell, shell, "-c", m_cmd.c_str(), static_cast<void*>(NULL)); 162 execl(shell, shell, "-c", exec_cmd.c_str(), static_cast<void*>(NULL));
160 exit(0); 163 exit(0);
161 164
162 return pid; // compiler happy -> we are happy ;) 165 return pid; // compiler happy -> we are happy ;)