aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-07-31 23:20:06 (GMT)
committermarkt <markt>2007-07-31 23:20:06 (GMT)
commit9bc606c9368da6f98e166b58d76d29dc8d7e9a64 (patch)
tree8f1d56eafc58da445b346b8e10c7b92894ddf6fd /src/main.cc
parent10001bb941c263fa4c138869b2d88fa78e409036 (diff)
downloadfluxbox-9bc606c9368da6f98e166b58d76d29dc8d7e9a64.zip
fluxbox-9bc606c9368da6f98e166b58d76d29dc8d7e9a64.tar.bz2
use some decorations on applications' torn menus, and fix restart without an argument
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main.cc b/src/main.cc
index 2d1ff0d..4554123 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -321,14 +321,16 @@ int main(int argc, char **argv) {
321 FbTk::FbStringUtil::shutdown(); 321 FbTk::FbStringUtil::shutdown();
322 322
323 if (restarting) { 323 if (restarting) {
324 const char *shell = getenv("SHELL"); 324 if (!restart_argument.empty()) {
325 if (!shell) 325 const char *shell = getenv("SHELL");
326 shell = "/bin/sh"; 326 if (!shell)
327 327 shell = "/bin/sh";
328 const char *arg = restart_argument.c_str(); 328
329 if (arg) { 329 const char *arg = restart_argument.c_str();
330 execlp(shell, shell, "-c", arg, (char *) NULL); 330 if (arg) {
331 perror(arg); 331 execlp(shell, shell, "-c", arg, (const char *) NULL);
332 perror(arg);
333 }
332 } 334 }
333 335
334 // fall back in case the above execlp doesn't work 336 // fall back in case the above execlp doesn't work