diff options
author | markt <markt> | 2007-06-09 17:47:22 (GMT) |
---|---|---|
committer | markt <markt> | 2007-06-09 17:47:22 (GMT) |
commit | 5704ad99d3e07fa1dc0a7b9cebd6135380df5e65 (patch) | |
tree | 75999c98e3a8ff8b469202ecca1392350c20d4f5 | |
parent | 9215c888aa1a7f2980bca794e2401e5d1a2e780d (diff) | |
download | fluxbox-5704ad99d3e07fa1dc0a7b9cebd6135380df5e65.zip fluxbox-5704ad99d3e07fa1dc0a7b9cebd6135380df5e65.tar.bz2 |
fix for exec changes
-rw-r--r-- | src/FbCommands.cc | 4 | ||||
-rw-r--r-- | util/fbrun/FbRun.cc | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 3775544..8266bce 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -156,11 +156,9 @@ int ExecuteCmd::run() { | |||
156 | displaystring.erase(displaystring.size()-1); | 156 | displaystring.erase(displaystring.size()-1); |
157 | displaystring += intbuff; | 157 | displaystring += intbuff; |
158 | 158 | ||
159 | std::string exec_cmd = "exec " + m_cmd; | ||
160 | |||
161 | setsid(); | 159 | setsid(); |
162 | putenv(const_cast<char *>(displaystring.c_str())); | 160 | putenv(const_cast<char *>(displaystring.c_str())); |
163 | execl(shell, shell, "-c", exec_cmd.c_str(), static_cast<void*>(NULL)); | 161 | execl(shell, shell, "-c", m_cmd.c_str(), static_cast<void*>(NULL)); |
164 | exit(0); | 162 | exit(0); |
165 | 163 | ||
166 | return pid; // compiler happy -> we are happy ;) | 164 | return pid; // compiler happy -> we are happy ;) |
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 95cb94d..908b3c2 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc | |||
@@ -124,10 +124,8 @@ void FbRun::run(const std::string &command) { | |||
124 | if (!shell) | 124 | if (!shell) |
125 | shell = "/bin/sh"; | 125 | shell = "/bin/sh"; |
126 | 126 | ||
127 | std::string exec_cmd = "exec " + command; | ||
128 | |||
129 | setsid(); | 127 | setsid(); |
130 | execl(shell, shell, "-c", exec_cmd.c_str(), static_cast<void*>(NULL)); | 128 | execl(shell, shell, "-c", command.c_str(), static_cast<void*>(NULL)); |
131 | exit(0); //exit child | 129 | exit(0); //exit child |
132 | } | 130 | } |
133 | 131 | ||