From 5166436617477d64bc99ae5215b46d82a99ffa51 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 21 Jan 2008 15:59:32 +0000 Subject: [PATCH] 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 --- src/Session.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Session.cpp b/src/Session.cpp index b8a2f97f3..43b294615 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -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() ?