diff --git a/src/apps/expander/ExpanderThread.cpp b/src/apps/expander/ExpanderThread.cpp index 6ee078cb63..a37f0c900e 100644 --- a/src/apps/expander/ExpanderThread.cpp +++ b/src/apps/expander/ExpanderThread.cpp @@ -258,8 +258,8 @@ ExpanderThread::PipeCommand(int argc, const char** argv, int& in, int& out, // "load" command. execv(argv[0], (char *const *)argv); - // shouldn't return - return -1; + // shouldn't get here + _exit(-1); } // parent diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 4cf7cbbeba..6a6bc5851f 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -432,7 +432,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) snprintf(handshake.msg, sizeof(handshake.msg), "could not set session leader."); send_handshake_message(terminalThread, handshake); - exit(1); + _exit(1); } /* open slave pty */ @@ -442,7 +442,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) snprintf(handshake.msg, sizeof(handshake.msg), "can't open tty (%s).", ttyName); send_handshake_message(terminalThread, handshake); - exit(1); + _exit(1); } /* set signal default */ @@ -487,7 +487,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) snprintf(handshake.msg, sizeof(handshake.msg), "failed set terminal interface (TERMIOS)."); send_handshake_message(terminalThread, handshake); - exit(1); + _exit(1); } /* @@ -503,7 +503,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) snprintf(handshake.msg, sizeof(handshake.msg), "mismatch handshake."); send_handshake_message(terminalThread, handshake); - exit(1); + _exit(1); } struct winsize ws = { handshake.row, handshake.col }; @@ -553,7 +553,7 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) "-l", NULL); } - exit(1); + _exit(1); } /*