[erlang-questions] Newbie: half-closing a port?

Tony Rogvall tony@REDACTED
Sun Feb 3 11:56:03 CET 2008


>
>
> I would like to be able to do something like this just before closing:
>
> Port ! {self(), eof}.
> % read output...
>

I vote yes !
The simplest way would probably to implement
a driver_control for the spawn driver (spawn_control) and add a  
library call somewhere
to let the user close the output pipe side. I am not sure about  
windows but it looks (at least to me)
as possible to implement.

(while at it put in something for changing the read buffer size and  
acknowledge input get flow control ;-)


What do you OTP people say ?

/Tony




More information about the erlang-questions mailing list