Re: [PATCH] osprocess: Introduce a simple sub-process package

Holger Hans Peter Freyther <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.