author | zecke <zecke> | 2002-10-15 00:33:13 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-15 00:33:13 (UTC) |
commit | b12b38a00c66ddc100f3fff75478539b8b797928 (patch) (unidiff) | |
tree | a28bafdaf00c2d89e1ef9680e6a31ff66bcc8bde /noncore/apps | |
parent | 06330eede01fa5082ec382045b63454b2262bba6 (diff) | |
download | opie-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
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 22 | ||||
-rw-r--r-- | noncore/apps/opie-console/procctl.cpp | 2 |
2 files changed, 18 insertions, 6 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 @@ | |||
84 | 84 | ||
85 | #include "procctl.h" | ||
85 | #include "MyPty.h" | 86 | #include "MyPty.h" |
@@ -115,2 +116,3 @@ void MyPty::donePty() | |||
115 | if (m_cpid) { | 116 | if (m_cpid) { |
117 | qWarning("killing!!!"); | ||
116 | kill(m_cpid, SIGHUP); | 118 | kill(m_cpid, SIGHUP); |
@@ -119,3 +121,4 @@ void MyPty::donePty() | |||
119 | 121 | ||
120 | emit done(status); | 122 | m_cpid = 0; |
123 | // emit done(status); | ||
121 | } | 124 | } |
@@ -131,2 +134,3 @@ void MyPty::error() | |||
131 | { | 134 | { |
135 | qWarning("error"); | ||
132 | // This is code from the Qt DumbTerminal example | 136 | // This is code from the Qt DumbTerminal example |
@@ -184,5 +188,5 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) | |||
184 | QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); | 188 | QSocketNotifier* sn_r = new QSocketNotifier(m_fd,QSocketNotifier::Read,this); |
185 | QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); | 189 | // QSocketNotifier* sn_e = new QSocketNotifier(m_fd,QSocketNotifier::Exception,this); |
186 | connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); | 190 | connect(sn_r,SIGNAL(activated(int)),this,SLOT(readPty())); |
187 | connect(sn_e,SIGNAL(activated(int)),this,SLOT(error())); | 191 | // connect(sn_e,SIGNAL(activated(int)),this,SLOT(error())); |
188 | 192 | ||
@@ -231,2 +235,3 @@ MyPty::MyPty(const Profile&) : m_cpid(0) | |||
231 | m_fd = openPty(); | 235 | m_fd = openPty(); |
236 | ProcCtl* ctl = ProcCtl::self(); | ||
232 | } | 237 | } |
@@ -261,3 +266,3 @@ void MyPty::send(const QByteArray& ar) | |||
261 | { | 266 | { |
262 | 267 | qWarning("sending!"); | |
263 | #ifdef VERBOSE_DEBUG | 268 | #ifdef VERBOSE_DEBUG |
@@ -276,2 +281,3 @@ void MyPty::readPty() | |||
276 | { | 281 | { |
282 | qWarning("read"); | ||
277 | QByteArray buf(4096); | 283 | QByteArray buf(4096); |
@@ -280,4 +286,9 @@ void MyPty::readPty() | |||
280 | 286 | ||
281 | if (len == -1) | 287 | if (len == -1 || len == 0) { |
288 | qWarning("donePty!!! now!"); | ||
282 | donePty(); | 289 | donePty(); |
290 | qWarning("return %s", sender()->className() ); | ||
291 | delete sender(); | ||
292 | return; | ||
293 | } | ||
283 | 294 | ||
@@ -286,2 +297,3 @@ void MyPty::readPty() | |||
286 | 297 | ||
298 | |||
287 | buf.resize(len); | 299 | buf.resize(len); |
diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp index b0b6846..d1cfaf6 100644 --- a/noncore/apps/opie-console/procctl.cpp +++ b/noncore/apps/opie-console/procctl.cpp | |||
@@ -73,3 +73,3 @@ int ProcCtl::status(pid_t pid )const{ | |||
73 | void ProcCtl::signal_handler(int) { | 73 | void ProcCtl::signal_handler(int) { |
74 | qWarning("signal handler"); | 74 | qWarning("signal handler in ProcCtl"); |
75 | int status; | 75 | int status; |