Fall back to /bin/sh if neither the profile command nor the /bin/bash environment variable is set.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=764376
This commit is contained in:
Robert Knight
2008-01-21 15:59:32 +00:00
parent 12f6c22b9d
commit 5166436617

View File

@@ -275,9 +275,12 @@ void Session::run()
// Check to see if the given program is executable.
QString exec = QFile::encodeName(_program);
// if 'exec' is not specified, fall back to shell
// if 'exec' is not specified, fall back to default shell. if that
// is not set then fall back to /bin/sh
if ( exec.isEmpty() )
exec = getenv("SHELL");
if ( exec.isEmpty() )
exec = "/bin/sh";
// if no arguments are specified, fall back to shell
QStringList arguments = _arguments.join(QChar(' ')).isEmpty() ?