[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    PATCH: kprocess hang and possible solution
From:       Stephan Kulow <coolo () kde ! org>
Date:       2000-10-06 18:20:26
[Download RAW message or body]

Hi!

The konsole hangs show the same problem as described
in http://bugs.kde.org/db/84/8433.html

I have the following patch since one week applied locally
and didn't experience any konsole hangs anymore since then.
Can anyone think of a problem with it? Who was KProcess
maintainer? :)

Greetings, Stephan

diff -u -u -r1.62 kprocess.cpp
--- kprocess.cpp        2000/09/09 15:26:47     1.62
+++ kprocess.cpp        2000/10/06 18:15:26
@@ -639,6 +639,10 @@
 
 
           while (1) {
+                   struct timeval timeout;
+                       timeout.tv_sec = 1;
+                       timeout.tv_usec = 0;
+
             FD_ZERO(&rfds);
             if (b_out)
               FD_SET(out[0], &rfds);
@@ -646,7 +650,7 @@
             if (b_err)
               FD_SET(err[0], &rfds);
 
-            fds_ready = select(max_fd+1, &rfds, 0, 0, 0);
+            fds_ready = select(max_fd+1, &rfds, 0, 0, &timeout);
             if (fds_ready <= 0) break;
 
             if (b_out && FD_ISSET(out[0], &rfds)) {    
-- 
... but you ain't had mine

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic