aboutsummaryrefslogtreecommitdiff
path: root/lib/base/console.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-02-23 02:17:26 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-02-23 02:17:26 +0000
commit67cd4d5af656603770e61f8ce8dacf7422d246aa (patch)
treeeed1788387d3ccf4af20ba9dc15090e6a59f2869 /lib/base/console.cpp
parenta19aef8b3244f753b02e5a06e7d3a185a424949f (diff)
downloadenigma2-67cd4d5af656603770e61f8ce8dacf7422d246aa.tar.gz
enigma2-67cd4d5af656603770e61f8ce8dacf7422d246aa.zip
dont kill pid -1
Diffstat (limited to 'lib/base/console.cpp')
-rw-r--r--lib/base/console.cpp7
1 files changed, 4 insertions, 3 deletions
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)