In case the user supplied a wrong commandline, the Terminal didn't launch
the shell as the code would seem to do. I've disabled showing the Alert, since system() doesn't return the return value of "alert". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21809 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -557,14 +557,17 @@ Shell::_Spawn(int row, int col, const char *command, const char *encoding)
|
||||
* Exec failed.
|
||||
*/
|
||||
sleep(1);
|
||||
const char *spawnAlertMessage = "alert --stop "
|
||||
/*const char *spawnAlertMessage = "alert --stop "
|
||||
"'Cannot execute \"%s\":\n"
|
||||
"\t%s\n'"
|
||||
"\t%s' "
|
||||
"'Use Default Shell' 'Abort'";
|
||||
char errorMessage[256];
|
||||
snprintf(errorMessage, sizeof(errorMessage), spawnAlertMessage, commandLine, strerror(errno));
|
||||
|
||||
if (system(errorMessage) == 0)
|
||||
// TODO: I'm not sure that system should return the return value of alert.
|
||||
// At least, it's not doing that right now.
|
||||
int returnValue = system(errorMessage);
|
||||
if (returnValue == 0)*/
|
||||
execl("/bin/sh", "/bin/sh", "-login", NULL);
|
||||
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user