mirror of
https://github.com/KDE/konsole.git
synced 2026-05-08 22:53:06 -04:00
Make minor adjustment as preparation for further changes.
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -87,18 +87,23 @@ extern "C" int KDE_EXPORT kdemain(int argc, char** argv)
|
||||
}
|
||||
bool shouldUseNewProcess()
|
||||
{
|
||||
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
// the only way to create new tab is to reuse existing Konsole process.
|
||||
if ( args->isSet("new-tab") ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// when starting Konsole from a terminal, a new process must be used
|
||||
// so that the current environment is propagated into the shells of the new
|
||||
// Konsole and any debug output or warnings from Konsole are written to
|
||||
// the current terminal
|
||||
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
bool hasControllingTTY = false ;
|
||||
if ( open("/dev/tty", O_RDONLY) != -1 ) {
|
||||
hasControllingTTY = true ;
|
||||
}
|
||||
|
||||
return hasControllingTTY && !args->isSet("new-tab");
|
||||
return hasControllingTTY;
|
||||
}
|
||||
|
||||
void fillCommandLineOptions(KCmdLineOptions& options)
|
||||
|
||||
Reference in New Issue
Block a user