diff options
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cc b/src/main.cc index fedc3a9..b458fbf 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -304,9 +304,10 @@ int main(int argc, char **argv) { | |||
304 | cerr.rdbuf(errbuf); | 304 | cerr.rdbuf(errbuf); |
305 | 305 | ||
306 | if (restarting) { | 306 | if (restarting) { |
307 | if (restart_argument.c_str()) { | 307 | const char *arg = restart_argument.c_str(); |
308 | execlp(restart_argument.c_str(), restart_argument.c_str(), 0); | 308 | if (arg) { |
309 | perror(restart_argument.c_str()); | 309 | execlp(arg, arg, (char *) NULL); |
310 | perror(arg); | ||
310 | } | 311 | } |
311 | 312 | ||
312 | // fall back in case the above execlp doesn't work | 313 | // fall back in case the above execlp doesn't work |