aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 643c6a4..2d1ff0d 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -321,9 +321,13 @@ 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");
325 if (!shell)
326 shell = "/bin/sh";
327
324 const char *arg = restart_argument.c_str(); 328 const char *arg = restart_argument.c_str();
325 if (arg) { 329 if (arg) {
326 execlp(arg, arg, (char *) NULL); 330 execlp(shell, shell, "-c", arg, (char *) NULL);
327 perror(arg); 331 perror(arg);
328 } 332 }
329 333