Re: Window freeze during fgets from pipe (solved)
| From: | Ciprian Popovici | Date: | Sun, 06 Jun 2004 16:39:56 +0000 |
| Subject: | Re: Window freeze during fgets from pipe (solved) | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4624@lists.php.net to get a copy of this message | ||
On Sun, 6 Jun 2004 18:42:15 +0300 Ciprian Popovici <ciprian@zuavra.net>
wrote:
> Apparently, the pause occurs while fgets() is executed and is waiting to
> receive something from the pipe.
>
> Does anyone have any idea about how I could overcome this issue? Is there
> any other background-executing statement that will execute in spite of
> fgets()? Is there a non-blocking way to read from a stream, such as
> connecting an event that will only get triggered when something comes
> through? Perhaps I'm going about this the wrong way in the first place?
Solved it myself: it was a simple matter of setting non-blocking mode on the
pipe:
stream_set_blocking($pipes[1],false);
--
Ciprian Popovici