From: Andreas Monzner Date: Thu, 23 Feb 2006 02:17:26 +0000 (+0000) Subject: dont kill pid -1 X-Git-Tag: 2.6.0~4033 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/67cd4d5af656603770e61f8ce8dacf7422d246aa?hp=a19aef8b3244f753b02e5a06e7d3a185a424949f dont kill pid -1 --- diff --git a/lib/base/console.cpp b/lib/base/console.cpp index 635d1145..f6e8763f 100644 --- a/lib/base/console.cpp +++ b/lib/base/console.cpp @@ -200,7 +200,7 @@ int eConsoleAppContainer::execute( const std::string &cmd ) if ( pid == -1 ) return -3; - eDebug("pipe in = %d, out = %d, err = %d", fd[0], fd[1], fd[2]); +// eDebug("pipe in = %d, out = %d, err = %d", fd[0], fd[1], fd[2]); in = new eSocketNotifier(eApp, fd[0], POLLIN|POLLPRI|POLLHUP ); out = new eSocketNotifier(eApp, fd[1], POLLOUT, false); @@ -218,7 +218,7 @@ eConsoleAppContainer::~eConsoleAppContainer() void eConsoleAppContainer::kill() { - if ( killstate != -1 ) + if ( killstate != -1 && pid != -1 ) { eDebug("user kill(SIGKILL) console App"); killstate=-1; @@ -239,7 +239,7 @@ void eConsoleAppContainer::kill() void eConsoleAppContainer::sendCtrlC() { - if ( killstate != -1 ) + if ( killstate != -1 && pid != -1 ) { eDebug("user send SIGINT(Ctrl-C) to console App"); ::kill(pid, SIGINT); @@ -276,6 +276,7 @@ void eConsoleAppContainer::closePipes() outbuf.pop(); delete [] d.data; } + pid = -1; } void eConsoleAppContainer::readyRead(int what)