Introduction into OSProcess

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

Introduction into OSProcess

Christoph Thiede
Hello,

I am trying to run a simple shell command using OSProcess:

ExternalWindowsOSProcess command: 'taskmgr.exe'

I'm afraid it "does not work", so after evaluating this expression, no
window opens and also no icon appears in the systray. If I open cmd.exe and
type taskmgr.exe there, taskmgr opens.

However, the following works as expected:

ExternalWindowsOSProcess command: 'notepad.exe'

Using absolute paths did not change the behavior.

I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
it me? Thanks in advance!

Christoph



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

Nicola Mingotti

Hi,

I am new in here and to Squeak in general.

To me OSProcess works in MacOS and FreeBSD (Linux emulation).

I don't have a Windows machine to try unfortunately.

This is a list of working examples (in my operating systems), maybe try to run something similar in Windows. I guess the equivalent of "ls" is "dir".

-------------------------------------------------
"in this case we want to take the output from an external program"
p := PipeableOSProcess command: 'ls -la'.
commandOutput := p output.
commandOutput.

"in this case you don't take the output, just run a program."
p := OSProcess command: 'ls -la'.

"In FreeBSD (Linux emulation) it works, open Emacs in a GUI."
p := OSProcess command: 'emacs'.
---------------------------------------------------

bye
Nicola





On 8/3/19 7:50 PM, Christoph Thiede wrote:
Hello,

I am trying to run a simple shell command using OSProcess:

ExternalWindowsOSProcess command: 'taskmgr.exe'

I'm afraid it "does not work", so after evaluating this expression, no
window opens and also no icon appears in the systray. If I open cmd.exe and
type taskmgr.exe there, taskmgr opens.

However, the following works as expected:

ExternalWindowsOSProcess command: 'notepad.exe'

Using absolute paths did not change the behavior.

I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
it me? Thanks in advance!

Christoph



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
jrm
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

jrm
In reply to this post by Christoph Thiede
Christoph,

You are more fortunate than I am. I tried it on my Win 7 box and it caused a crash.

There is a way to send output to stdout and stderr . Try adding that to your command and see what you get.

Reminder to all beginners, "Save early and save often"

-jrm

On Sat, Aug 3, 2019 at 10:50 AM Christoph Thiede <[hidden email]> wrote:
Hello,

I am trying to run a simple shell command using OSProcess:

ExternalWindowsOSProcess command: 'taskmgr.exe'

I'm afraid it "does not work", so after evaluating this expression, no
window opens and also no icon appears in the systray. If I open cmd.exe and
type taskmgr.exe there, taskmgr opens.

However, the following works as expected:

ExternalWindowsOSProcess command: 'notepad.exe'

Using absolute paths did not change the behavior.

I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
it me? Thanks in advance!

Christoph



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

Christoph Thiede

Hi John,


[(OSProcess command: 'notepad.exe 2>&1') value] passes '>2&1' as an argument to notepad.exe. If I use PipeableOSProces instead, there is only shown an empty cmd window, no matter what the command is.


@Nicola: Strange, running your first example made my Squeak cursor flickering until I interrupted the command ...


Best,

Christoph


Von: Beginners <[hidden email]> im Auftrag von John-Reed Maffeo <[hidden email]>
Gesendet: Montag, 5. August 2019 00:48:49
An: A friendly place to get answers to even the most basic questions about Squeak.
Betreff: Re: [Newbies] Introduction into OSProcess
 
Christoph,

You are more fortunate than I am. I tried it on my Win 7 box and it caused a crash.

There is a way to send output to stdout and stderr . Try adding that to your command and see what you get.

Reminder to all beginners, "Save early and save often"

-jrm

On Sat, Aug 3, 2019 at 10:50 AM Christoph Thiede <[hidden email]> wrote:
Hello,

I am trying to run a simple shell command using OSProcess:

ExternalWindowsOSProcess command: 'taskmgr.exe'

I'm afraid it "does not work", so after evaluating this expression, no
window opens and also no icon appears in the systray. If I open cmd.exe and
type taskmgr.exe there, taskmgr opens.

However, the following works as expected:

ExternalWindowsOSProcess command: 'notepad.exe'

Using absolute paths did not change the behavior.

I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
it me? Thanks in advance!

Christoph



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

David T. Lewis
In reply to this post by Christoph Thiede
On Sat, Aug 03, 2019 at 12:50:44PM -0500, Christoph Thiede wrote:

> Hello,
>
> I am trying to run a simple shell command using OSProcess:
>
> ExternalWindowsOSProcess command: 'taskmgr.exe'
>
> I'm afraid it "does not work", so after evaluating this expression, no
> window opens and also no icon appears in the systray. If I open cmd.exe and
> type taskmgr.exe there, taskmgr opens.
>
> However, the following works as expected:
>
> ExternalWindowsOSProcess command: 'notepad.exe'
>
> Using absolute paths did not change the behavior.
>
> I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
> it me? Thanks in advance!
>


Hi Christoph,

Support for Windows is very incomplete in OSProcess. I am
not a Windows user, but I understand that the ProcessWrapper
package works very well. You can find ProcessWrapper at
http://www.squeaksource.com/ProcessWrapper

Dave

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

Christoph Thiede

Hi Dave,


thank you for the hint, but the dependency chain of ProcessWrapper seems very long (ProcessWrapperPlugin, SmartSyntaxInterpreterPlugin, VMMaker, KlattResonatorIndices, FFI, ...). Can I get SmartSyntaxInterpreterPlugin anywhere separately?


Best,

Christoph


Von: Beginners <[hidden email]> im Auftrag von David T. Lewis <[hidden email]>
Gesendet: Montag, 5. August 2019 14:53:28
An: A friendly place to get answers to even the most basic questions about Squeak.
Betreff: Re: [Newbies] Introduction into OSProcess
 
On Sat, Aug 03, 2019 at 12:50:44PM -0500, Christoph Thiede wrote:
> Hello,
>
> I am trying to run a simple shell command using OSProcess:
>
> ExternalWindowsOSProcess command: 'taskmgr.exe'
>
> I'm afraid it "does not work", so after evaluating this expression, no
> window opens and also no icon appears in the systray. If I open cmd.exe and
> type taskmgr.exe there, taskmgr opens.
>
> However, the following works as expected:
>
> ExternalWindowsOSProcess command: 'notepad.exe'
>
> Using absolute paths did not change the behavior.
>
> I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
> it me? Thanks in advance!
>


Hi Christoph,

Support for Windows is very incomplete in OSProcess. I am
not a Windows user, but I understand that the ProcessWrapper
package works very well. You can find ProcessWrapper at
http://www.squeaksource.com/ProcessWrapper

Dave

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

David T. Lewis
I can't check this myself right now, but if you go to the
http://www.squeaksource.com page and navigate to the ProcessWrapper
project, the overview page says that you can download a copy of the plugin
by evaluating "ProcessWrapper downloadPlugin". If that works, then you can
copy the plugin dll to the folder for your VM (wherever the other plugin
dll's are located), and hopefully it will just work. I am guessing that
the download will be for a 32 bit Windows VM.

HTH,
Dave

> Hi Dave,
>
>
> thank you for the hint, but the dependency chain of ProcessWrapper seems
> very long (ProcessWrapperPlugin, SmartSyntaxInterpreterPlugin, VMMaker,
> KlattResonatorIndices, FFI, ...). Can I get SmartSyntaxInterpreterPlugin
> anywhere separately?
>
>
> Best,
>
> Christoph
>
> ________________________________
> Von: Beginners <[hidden email]> im Auftrag
> von David T. Lewis <[hidden email]>
> Gesendet: Montag, 5. August 2019 14:53:28
> An: A friendly place to get answers to even the most basic questions about
> Squeak.
> Betreff: Re: [Newbies] Introduction into OSProcess
>
> On Sat, Aug 03, 2019 at 12:50:44PM -0500, Christoph Thiede wrote:
>> Hello,
>>
>> I am trying to run a simple shell command using OSProcess:
>>
>> ExternalWindowsOSProcess command: 'taskmgr.exe'
>>
>> I'm afraid it "does not work", so after evaluating this expression, no
>> window opens and also no icon appears in the systray. If I open cmd.exe
>> and
>> type taskmgr.exe there, taskmgr opens.
>>
>> However, the following works as expected:
>>
>> ExternalWindowsOSProcess command: 'notepad.exe'
>>
>> Using absolute paths did not change the behavior.
>>
>> I installed the latest OSProcess version via SqueakMap. Is this a bug,
>> or is
>> it me? Thanks in advance!
>>
>
>
> Hi Christoph,
>
> Support for Windows is very incomplete in OSProcess. I am
> not a Windows user, but I understand that the ProcessWrapper
> package works very well. You can find ProcessWrapper at
> http://www.squeaksource.com/ProcessWrapper
>
> Dave
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Introduction into OSProcess

Nicola Mingotti
In reply to this post by Christoph Thiede

@Nicola: Strange, running your first example made my Squeak cursor flickering until I interrupted the command ...

Double check:
-------
p := PipeableOSProcess command: 'ls -la'.
p output.
-------

1] In MacOS 10.14.5, confirmed to work.
2] In FreeBSD 12 (Linux emulation 64bit) , confirmed to work

Can't tell you much more unfortunately.

bye
Nicola




On Aug 5, 2019, at 12:48 AM, Thiede, Christoph <[hidden email]> wrote:

Hi John,

[(OSProcess command: 'notepad.exe 2>&1') value] passes '>2&1' as an argument to notepad.exe. If I use PipeableOSProces instead, there is only shown an empty cmd window, no matter what the command is.

@Nicola: Strange, running your first example made my Squeak cursor flickering until I interrupted the command ...

Best,
Christoph

Von: Beginners <[hidden email]> im Auftrag von John-Reed Maffeo <[hidden email]>
Gesendet: Montag, 5. August 2019 00:48:49
An: A friendly place to get answers to even the most basic questions about Squeak.
Betreff: Re: [Newbies] Introduction into OSProcess
 
Christoph,

You are more fortunate than I am. I tried it on my Win 7 box and it caused a crash.

There is a way to send output to stdout and stderr . Try adding that to your command and see what you get.

Reminder to all beginners, "Save early and save often"

-jrm

On Sat, Aug 3, 2019 at 10:50 AM Christoph Thiede <[hidden email]> wrote:
Hello,

I am trying to run a simple shell command using OSProcess:

ExternalWindowsOSProcess command: 'taskmgr.exe'

I'm afraid it "does not work", so after evaluating this expression, no
window opens and also no icon appears in the systray. If I open cmd.exe and
type taskmgr.exe there, taskmgr opens.

However, the following works as expected:

ExternalWindowsOSProcess command: 'notepad.exe'

Using absolute paths did not change the behavior.

I installed the latest OSProcess version via SqueakMap. Is this a bug, or is
it me? Thanks in advance!

Christoph



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners