get output of a forked process on windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

get output of a forked process on windows

demarey
Hi,

I would like to evaluate a Smalltalk expression in a forked process (i.e. something like OSProcess thisOSProcess waitForCommandOutput: 'pharo Pharo.image eval "SystemVersion current dottedMajorMinor"').
It is doable on linux/mac with OSProcess but not on Windows. Is there another way to do that on Windows? I would prefer to avoid to write to a file.

Thanks,
Christophe
Reply | Threaded
Open this post in threaded view
|

Re: get output of a forked process on windows

Guillermo Polito
Have you checked the Console version of the windows VM?

On Tue, Jul 18, 2017 at 10:48 AM, Christophe Demarey <[hidden email]> wrote:
Hi,

I would like to evaluate a Smalltalk expression in a forked process (i.e. something like OSProcess thisOSProcess waitForCommandOutput: 'pharo Pharo.image eval "SystemVersion current dottedMajorMinor"').
It is doable on linux/mac with OSProcess but not on Windows. Is there another way to do that on Windows? I would prefer to avoid to write to a file.

Thanks,
Christophe



--

   

Guille Polito


Research Engineer

French National Center for Scientific Research - http://www.cnrs.fr



Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: get output of a forked process on windows

demarey
PharoConsole.exe is only available for image versions > 50.
I need a solution that works on older image versions.

Thanks for the advice,
Christophe

Le 18 juil. 2017 à 14:26, Guillermo Polito <[hidden email]> a écrit :

Have you checked the Console version of the windows VM?

On Tue, Jul 18, 2017 at 10:48 AM, Christophe Demarey <[hidden email]> wrote:
Hi,

I would like to evaluate a Smalltalk expression in a forked process (i.e. something like OSProcess thisOSProcess waitForCommandOutput: 'pharo Pharo.image eval "SystemVersion current dottedMajorMinor"').
It is doable on linux/mac with OSProcess but not on Windows. Is there another way to do that on Windows? I would prefer to avoid to write to a file.

Thanks,
Christophe



--
   
Guille Polito

Research Engineer
French National Center for Scientific Research - http://www.cnrs.fr


Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: get output of a forked process on windows

Thierry Goubier
Hi Christophe,

You have to use ProcessWrapper.

Metacello new
  configuration: 'ProcessWrapper';
  load

(as extracted from the baseline of GitFileTree for Pharo4)

Regards,

Thierry


2017-07-18 15:34 GMT+02:00 Christophe Demarey <[hidden email]>:
PharoConsole.exe is only available for image versions > 50.
I need a solution that works on older image versions.

Thanks for the advice,
Christophe

Le 18 juil. 2017 à 14:26, Guillermo Polito <[hidden email]> a écrit :

Have you checked the Console version of the windows VM?

On Tue, Jul 18, 2017 at 10:48 AM, Christophe Demarey <[hidden email]> wrote:
Hi,

I would like to evaluate a Smalltalk expression in a forked process (i.e. something like OSProcess thisOSProcess waitForCommandOutput: 'pharo Pharo.image eval "SystemVersion current dottedMajorMinor"').
It is doable on linux/mac with OSProcess but not on Windows. Is there another way to do that on Windows? I would prefer to avoid to write to a file.

Thanks,
Christophe



--
   
Guille Polito

Research Engineer
French National Center for Scientific Research - http://www.cnrs.fr


Phone: <a href="tel:+33%206%2052%2070%2066%2013" value="+33652706613" target="_blank">+33 06 52 70 66 13


Reply | Threaded
Open this post in threaded view
|

Re: get output of a forked process on windows

demarey
Hi Thierry,

Le 18 juil. 2017 à 15:40, Thierry Goubier <[hidden email]> a écrit :

Hi Christophe,

You have to use ProcessWrapper.

Metacello new
  configuration: 'ProcessWrapper';
  load

Thanks, it is working with the given example from http://smalltalkhub.com/#!/~hernan/ProcessWrapper/.

Best regards,
Christophe