diff options
author | markt <markt> | 2007-07-31 23:16:05 (GMT) |
---|---|---|
committer | markt <markt> | 2007-07-31 23:16:05 (GMT) |
commit | 8da54ca0eb91e0595b506725369ede0a6426d795 (patch) | |
tree | 444fbcc9849c10764f5bc6f3b71481c6057992a8 /src/main.cc | |
parent | 363764db5b36dbffcc019cec8ffb405d357d7130 (diff) | |
download | fluxbox-8da54ca0eb91e0595b506725369ede0a6426d795.zip fluxbox-8da54ca0eb91e0595b506725369ede0a6426d795.tar.bz2 |
add some decorations to torn menus, and fix restart without an argument
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 18 |
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 |