[Pharo-users] [ANN] OSSubprocess first milestone

Luc Fabresse luc.fabresse at gmail.com
Fri Jan 15 02:40:43 EST 2016

Hi Mariano,

Thanks to tackle and document these things!

I did not read all what you wrote yet, but do you have also the possibility
to process stdout/stderr while the external process is running and not only
on exit?

Something like:

OSSUnixSubprocess new
    command: 'reallyLongToExecuteCommandWithLotsOfThingsOnStdout';
    runAndDo: [ :process :outStream :errStream |
  "I can analyze outStream / errStream"
"and even show status to the user"
    ] each: 5 seconds;
    onExitDo: [ :process :outStream :errStream  |



2016-01-15 8:20 GMT+01:00 Thierry Goubier <thierry.goubier at gmail.com>:

> And for those who would like to use it (or for Mac OS X users), a
> GitFileTree version using it is available by loading it this way:
> Metacello new
>         baseline: 'FileTree';
>         repository: 'github://dalehenrich/filetree:issue_171/repository';
>         load: 'Git'
> Regards,
> Thierry
> Le 14/01/2016 19:33, Mariano Martinez Peck a écrit :
>> Dear all,
>> I am happy to tell you I have a first prototype of the tool for
>> executing OS processes:
>> https://github.com/marianopeck/OSSubprocess
>>   As I said many times, the main idea was to be as much as possible
>> FFI-based, only for executing OS commands and, from my point of view, a
>> better end-user API. Also, as for the first step, I had to focus on
>> Linux/OSX.
>> I would like to thank Pharo Consortium for the sponsor of this
>> development effort. Here is the first milestone!
>> There are many things on my to-do but I think the code is ready for some
>> usage, testing, code review and feedback!
>> All classes and all methods have comments and I have quite some unit
>> tests. All tests are green in my OSX and a CentOS box.
>> *Important: you CANNOT have OSProcess installed in the same image as
>> OSSubprocess. This is because I am reusing his SIGCHLD handler and for
>> the time being both cannot coexist. *
>> Keep in mind that the tool may be unstable and that MAY mean a VM crash.
>> So use with care, mostly the first time. If all tests passes, then there
>> are much less chances of something going bad.
>> Important disclaimer: my tool (OSSubproccess from now onward) is HIGHLY
>> influenced by a subset of the OSProcess project. There are parts which I
>> even simply copied and adapted them (OSSPipe, OSSAttachableStream,
>> OSSUnixProcessExitStatus). Other parts, I took them as inspiration (the
>> idea of ThisOSProcess representing the VM process, the child watcher,
>> and many others). In addition, I AM STILL USING (maybe as a first step?)
>> some of the OSProcess PLUGIN (not OSProcess image side), such as the
>> SIGCHLD handler or the creation of pipes.
>> In github url you have all the documentation of the project, included
>> how to install it and use it.
>> *Finally, if you test it in a OS different than OSX and CentOS please
>> share with me the results (about the tests).* Tomorrow the
>> ConfigurationOf should also appear in the Catalog of Pharo 5.0.
>> Any feedback is appreciated.
>> Best,
>> --
>> Mariano
>> http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160115/0b8a70ec/attachment.html>

More information about the Pharo-users mailing list