guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: very obscure problem, help needed


From: Gary Houston
Subject: Re: very obscure problem, help needed
Date: 2 Nov 2000 22:36:25 -0000

> From: "Dale P. Smith" <address@hidden>
> Date: Thu, 2 Nov 2000 10:07:07 -0500
> 
> *Is* there any reason why we would want the unflushed behavior?  The
> only thing I can think of is if you encounter some kind of error or
> something and you want to throw away the pending output before dealing
> with the error.  Maybe for efficiency?  Your child process doesn't
> generate any output and you want to keep your output in buffer sized
> chunks?  I dunno.

I don't think it should flush the ports.  Apart from efficiency, it
would be bad for multithreaded applications.  If you run:

(open-input-pipe "ls")

you don't expect it to have a side effect on other ports, maybe
clobbering a different thread which was doing unrelated I/O.

I think it's a bug in open-input-pipe: in the child process it's
closing most of the ports in the system, which flushes the buffers.
Probably it would be OK if the port file descriptors were closed
without flushing the buffers.

For comparison, it seems that libc popen closes only streams opened by
other popen calls and doesn't flush the buffers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]