summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/MyPty.cpp
authorzecke <zecke>2002-10-15 00:33:13 (UTC)
committer zecke <zecke>2002-10-15 00:33:13 (UTC)
commitb12b38a00c66ddc100f3fff75478539b8b797928 (patch) (side-by-side diff)
treea28bafdaf00c2d89e1ef9680e6a31ff66bcc8bde /noncore/apps/opie-console/MyPty.cpp
parent06330eede01fa5082ec382045b63454b2262bba6 (diff)
downloadopie-b12b38a00c66ddc100f3fff75478539b8b797928.zip
opie-b12b38a00c66ddc100f3fff75478539b8b797928.tar.gz
opie-b12b38a00c66ddc100f3fff75478539b8b797928.tar.bz2
Temp disable the Error notifier this fixes the probs with exiting taking 90%+ of CPU time
Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index 10828b0..cacb4ce 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -84,2 +84,3 @@
+#include "procctl.h"
#include "MyPty.h"
@@ -115,2 +116,3 @@ void MyPty::donePty()
if (m_cpid) {
+ qWarning("killing!!!");
kill(m_cpid, SIGHUP);
@@ -119,3 +121,4 @@ void MyPty::donePty()
- emit done(status);
+ m_cpid = 0;
+// emit done(status);
}
@@ -131,2 +134,3 @@ void MyPty::error()
{
+ qWarning("error");
// This is code from the Qt DumbTerminal example
@@ -184,5 +188,5 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int)
QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this);
- QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this);
+// QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this);
connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty()));
- connect(sn_e,SIGNAL(activated(int)),this,SLOT(error()));
+// connect(sn_e,SIGNAL(activated(int)),this,SLOT(error()));
@@ -231,2 +235,3 @@ MyPty::MyPty(const Profile&) : m_cpid(0)
m_fd = openPty();
+ ProcCtl* ctl = ProcCtl::self();
}
@@ -261,3 +266,3 @@ void MyPty::send(const QByteArray& ar)
{
-
+ qWarning("sending!");
#ifdef VERBOSE_DEBUG
@@ -276,2 +281,3 @@ void MyPty::readPty()
{
+ qWarning("read");
QByteArray buf(4096);
@@ -280,4 +286,9 @@ void MyPty::readPty()
- if (len == -1)
+ if (len == -1 || len == 0) {
+ qWarning("donePty!!! now!");
donePty();
+ qWarning("return %s", sender()->className() );
+ delete sender();
+ return;
+ }
@@ -286,2 +297,3 @@ void MyPty::readPty()
+
buf.resize(len);