On Sat, May 11, 2013 at 08:15:45PM +0200, Paolo Bonzini wrote:

> Perhaps the user interface should just be
> 
>     OSProcess new
>           ... ;
>           exec: command args: args;
>           yourself
> 
> You could have methods like
> 
>     FileDescriptor class>>#twoPipes (returns an array of two pipes)
>     OSProcess>>#stdin: (accepts a readable FileDescriptor)
>     OSProcess>>#stdout: (accepts a writeable FileDescriptor)
>     OSProcess>>#stderr: (accepts a writeable FileDescriptor)
>     OSProcess>>#stdin
>     OSProcess>>#stdout
>     OSProcess>>#stderr
>     OSProcess>>#stdinPipe (returns the write side)
>     OSProcess>>#stdoutPipe (returns the read side)
>     OSProcess>>#stderrPipe (returns the read side)
> 
> Thanks for doing this.  It's been on my todo list forever.

Any opinion on SIGCHLD/wait handling? Should there be a semaphore
in OSProcess to indicate the termination of the process or should
we hope that the termination will lead to the socket being closed
and this is something that leads to EndOfStream notification?

holger


_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to