Fwd: NativeBoost and standard out

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

Fwd: NativeBoost and standard out

Sean P. DeNigris
Administrator
Emilio Oca-3 wrote
Hi

 

Is it possible to get the stdout results when running  WinProcess
createAndWaitForProcess: aCommand?.

If it is not, any alternative?

 

Best

 

    Emilio
Bump...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Igor Stasenko



On 23 December 2013 20:06, Sean P. DeNigris <[hidden email]> wrote:
Emilio Oca-3 wrote
> Hi
>
>
>
> Is it possible to get the stdout results when running  WinProcess
> createAndWaitForProcess: aCommand?.
>
> If it is not, any alternative?
>
>
>
> Best
>
>
>
>     Emilio

Bump...


I not sure how this question related to NB. WinProcess is not part of it. 
As for alternatives, i guess there is some, and can be implemented with FFI calls,
but what exactly, you better look for windows API docs.

--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: NativeBoost and standard out

EstebanLM

On 23 Dec 2013, at 21:13, Igor Stasenko <[hidden email]> wrote:




On 23 December 2013 20:06, Sean P. DeNigris <[hidden email]> wrote:
Emilio Oca-3 wrote
> Hi
>
>
>
> Is it possible to get the stdout results when running  WinProcess
> createAndWaitForProcess: aCommand?.
>
> If it is not, any alternative?
>
>
>
> Best
>
>
>
>     Emilio

Bump...


I not sure how this question related to NB. WinProcess is not part of it. 
As for alternatives, i guess there is some, and can be implemented with FFI calls,
but what exactly, you better look for windows API docs.

is related to NB-FFI, I guess. 

I recommend you to take a look at this: 


there can be a solution (not sure, because I never used it)

Other possibility is not using NB but OSProcess: 


hope it solves your problem. 

cheers, 
Esteban


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

hernanmd
In reply to this post by Sean P. DeNigris
Maybe does this help

(Proceed the warning)
Gofer it
        url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
        package: 'ProcessWrapper-Core';
        package: 'ProcessWrapper-Plugin';
        package: 'ProcessWrapper-Tests';
        load.

ProcessWrapper new
           useStdout;
           startWithShellCommand: 'dir | sort';
           upToEnd

Hernán

El 23/12/2013 16:06, Sean P. DeNigris escribió:

> Emilio Oca-3 wrote
>> Hi
>>
>>
>>
>> Is it possible to get the stdout results when running  WinProcess
>> createAndWaitForProcess: aCommand?.
>>
>> If it is not, any alternative?
>>
>>
>>
>> Best
>>
>>
>>
>>      Emilio
>
> Bump...
>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Fwd-NativeBoost-and-standard-out-tp4732117.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Sean P. DeNigris
Administrator
Hernán Morales Durand wrote
Maybe does this help
ProcessWrapper new
           useStdout;
           startWithShellCommand: 'dir | sort';
           upToEnd
Intriguing! I'll try it when I get access to a Windows machine... Thanks :)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Sean P. DeNigris
Administrator
That was just what I needed. Thanks, Hernan! It seems like we could consolidate a bit on Windows: we have NB, ProcessWrapper, and OSProcess, all of which have a piece of the functionality you'd want for interacting with external processes...


-------- Original message --------
From: "Sean P. DeNigris [via Smalltalk]" <[hidden email]>
Date: 12/24/2013 9:46 AM (GMT-05:00)
To: "Sean P. DeNigris" <[hidden email]>
Subject: Re: Fwd: NativeBoost and standard out


Hernán Morales Durand wrote
Maybe does this help ProcessWrapper
...
Intriguing! I'll try it when I get access to a Windows machine... Thanks :)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Goubier Thierry
Hi Sean,

can you summarize what you ended up with? I'd really like to get a
solution to be able to support git in Windows.

Thanks,

Thierry

Le 17/01/2014 02:29, Sean P. DeNigris a écrit :

> That was just what I needed. Thanks, Hernan! It seems like we could
> consolidate a bit on Windows: we have NB, ProcessWrapper, and OSProcess,
> all of which have a piece of the functionality you'd want for
> interacting with external processes...
>
>
> -------- Original message --------
> From: "Sean P. DeNigris [via Smalltalk]" <[hidden email]
> </user/SendEmail.jtp?type=node&node=4737390&i=0>>
> Date: 12/24/2013 9:46 AM (GMT-05:00)
> To: "Sean P. DeNigris" <[hidden email]
> </user/SendEmail.jtp?type=node&node=4737390&i=1>>
> Subject: Re: Fwd: NativeBoost and standard out
>
>
>     Hernán Morales Durand wrote
>     Maybe does this help ProcessWrapper
>     ...
>
> Intriguing! I'll try it when I get access to a Windows machine... Thanks :)
> Cheers,
> Sean
>
> ------------------------------------------------------------------------
> View this message in context: Re: Fwd: NativeBoost and standard out
> <http://forum.world.st/Fwd-NativeBoost-and-standard-out-tp4732117p4737390.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.

--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: NativeBoost and standard out

Emilio Oca-3
In reply to this post by EstebanLM
Hi Esteban
> I recommend you to take a look at this: 
> http://smalltalkhub.com/#!/~OS/OS-Windows
> there can be a solution (not sure, because I never used it)
Yes I did, I got something like this

    si := WinStartupInfo new.
    si wShowWindow: 0.
    pi := WinProcessInformation new.
    WinProcess createProcess: aCommand startupInfo: si processInformation:
pi.
    [ (WinProcess waitForSingleObject: pi hProcess timeout: 10) > 0 ]
whileTrue: [
         (Delay forMilliseconds: 10) wait.
    ].
    pi hProcess closeHandle.
    pi hThread closeHandle.
That gives me some synchronicity betwtenn several of these proceses without
freezing the image
aCommand may be...
'sqlplus -S usr/pass@QA @V:\work\suite.sql > proc.log' works but doesn't
writes into proc.log
'c:\path\test.bat > proc.log' works as expected

I am looking for a way to get at least the sql sentence stdout writen into a
file.


> Other possibility is not using NB but OSProcess: 
> http://www.squeaksource.com/OSProcess.html
> hope it solves your problem. 
I am exploring this now, thanks

> cheers, 
> Esteban

Best

    Emilio


--
Best regards,
Igor Stasenko.



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Emilio Oca-3
In reply to this post by hernanmd
Thanks Hernan, I am going to try it

Best

    Emilio

> -----Mensaje original-----
> De: Pharo-users [mailto:[hidden email]] En nombre
> de Hernán Morales Durand
> Enviado el: Lunes, 23 de Diciembre de 2013 17:55
> Para: Any question about pharo is welcome
> Asunto: Re: [Pharo-users] Fwd: NativeBoost and standard out
>
> Maybe does this help
>
> (Proceed the warning)
> Gofer it
> url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
> package: 'ProcessWrapper-Core';
> package: 'ProcessWrapper-Plugin';
> package: 'ProcessWrapper-Tests';
> load.
>
> ProcessWrapper new
>            useStdout;
>            startWithShellCommand: 'dir | sort';
>            upToEnd
>
> Hernán
>
> El 23/12/2013 16:06, Sean P. DeNigris escribió:
> > Emilio Oca-3 wrote
> >> Hi
> >>
> >>
> >>
> >> Is it possible to get the stdout results when running  WinProcess
> >> createAndWaitForProcess: aCommand?.
> >>
> >> If it is not, any alternative?
> >>
> >>
> >>
> >> Best
> >>
> >>
> >>
> >>      Emilio
> >
> > Bump...
> >
> >
> >
> >
> > -----
> > Cheers,
> > Sean
> > --
> > View this message in context: http://forum.world.st/Fwd-NativeBoost-
> and-standard-out-tp4732117.html
> > Sent from the Pharo Smalltalk Users mailing list archive at
> Nabble.com.
> >
> >



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Emilio Oca-3
In reply to this post by hernanmd
Hernan

> -----Mensaje original-----
> De: Pharo-users [mailto:[hidden email]] En nombre
> de Hernán Morales Durand
>
> Maybe does this help
Yes! beatiful and lovely

Emilio

>
> (Proceed the warning)
> Gofer it
> url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
> package: 'ProcessWrapper-Core';
> package: 'ProcessWrapper-Plugin';
> package: 'ProcessWrapper-Tests';
> load.
>
> ProcessWrapper new
>            useStdout;
>            startWithShellCommand: 'dir | sort';
>            upToEnd
>
> Hernán
>
> El 23/12/2013 16:06, Sean P. DeNigris escribió:
> > Emilio Oca-3 wrote
> >> Hi
> >>
> >>
> >>
> >> Is it possible to get the stdout results when running  WinProcess
> >> createAndWaitForProcess: aCommand?.
> >>
> >> If it is not, any alternative?
> >>
> >>
> >>
> >> Best
> >>
> >>
> >>
> >>      Emilio
> >
> > Bump...
> >
> >
> >
> >
> > -----
> > Cheers,
> > Sean
> > --
> > View this message in context: http://forum.world.st/Fwd-NativeBoost-
> and-standard-out-tp4732117.html
> > Sent from the Pharo Smalltalk Users mailing list archive at
> Nabble.com.
> >
> >



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Sean P. DeNigris
Administrator
Emilio Oca-3 wrote
> Maybe does this help
Yes! beatiful and lovely
Ugh, we really need to document the external process options so people don't have to go through this frustration again and again. Ultimately, it'd be great to have at least one library that works on all platforms...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

philippeback
This is compounded by the fact that I regularly have stdout and stderr making my image hanging for some weird reason.

Phil




On Fri, Feb 7, 2014 at 6:29 PM, Sean P. DeNigris <[hidden email]> wrote:
Emilio Oca-3 wrote
>> Maybe does this help
> Yes! beatiful and lovely

Ugh, we really need to document the external process options so people don't
have to go through this frustration again and again. Ultimately, it'd be
great to have at least one library that works on all platforms...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Fwd-NativeBoost-and-standard-out-tp4732117p4742216.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Emilio Oca-3
In reply to this post by Sean P. DeNigris
Yes, that would be great.
First time doing something like this, tried 4 options so far. Features seems
to overlap a lot and with few example tests (or none) referencing most of
the interface offered.
I am sure an illiterate on pluggins, dlls or API calling, it was difficult
for me to figure out how to do something different or more complex than the
samples offered.

Best

  Emilio


> -----Mensaje original-----
> De: Pharo-users [mailto:[hidden email]] En nombre
> de Sean P. DeNigris
> Enviado el: Viernes, 07 de Febrero de 2014 14:29
> Para: [hidden email]
> Asunto: Re: [Pharo-users] Fwd: NativeBoost and standard out
>
> Emilio Oca-3 wrote
> >> Maybe does this help
> > Yes! beatiful and lovely
>
> Ugh, we really need to document the external process options so people
> don't
> have to go through this frustration again and again. Ultimately, it'd be
> great to have at least one library that works on all platforms...
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Fwd-NativeBoost-and-
> standard-out-tp4732117p4742216.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Goubier Thierry
In reply to this post by Sean P. DeNigris
+1 : one library that works !

Thierry
________________________________________
De : Pharo-users [[hidden email]] de la part de Sean P. DeNigris [[hidden email]]
Date d'envoi : vendredi 7 février 2014 18:29
À : [hidden email]
Objet : Re: [Pharo-users] Fwd: NativeBoost and standard out

Emilio Oca-3 wrote
>> Maybe does this help
> Yes! beatiful and lovely

Ugh, we really need to document the external process options so people don't
have to go through this frustration again and again. Ultimately, it'd be
great to have at least one library that works on all platforms...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Fwd-NativeBoost-and-standard-out-tp4732117p4742216.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NativeBoost and standard out

Igor Stasenko
In reply to this post by philippeback



On 7 February 2014 18:38, [hidden email] <[hidden email]> wrote:
This is compounded by the fact that I regularly have stdout and stderr making my image hanging for some weird reason.


blocking i/o + buffering on other end of pipe ==>> "hanging" image :)
 
Phil





On Fri, Feb 7, 2014 at 6:29 PM, Sean P. DeNigris <[hidden email]> wrote:
Emilio Oca-3 wrote
>> Maybe does this help
> Yes! beatiful and lovely

Ugh, we really need to document the external process options so people don't
have to go through this frustration again and again. Ultimately, it'd be
great to have at least one library that works on all platforms...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Fwd-NativeBoost-and-standard-out-tp4732117p4742216.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.






--
Best regards,
Igor Stasenko.