Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-16 Thread Denis Kudriashov
2017-05-16 13:01 GMT+02:00 K K Subbu : > > If you run it from command line, does it list the files on the tty? Then > it could be a bug in redirectStdout method. > Yes, it works from command line

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-16 Thread K K Subbu
On Tuesday 16 May 2017 04:26 PM, Denis Kudriashov wrote: I checked again. It not works on Raspberry same way: empty string returns. Not know how it would be on other Linux If you run it from command line, does it list the files on the tty? Then it could be a bug in redirectStdout method.

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-16 Thread Denis Kudriashov
2017-05-15 22:19 GMT+02:00 Denis Kudriashov : > 2017-05-15 18:10 GMT+02:00 Alistair Grant : > >> And if I execute the following in a playground: >> >> | ls | >> OSSUnixSubprocess new >> shellCommand: 'ls ~'; >> redirectStdout; >>

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
2017-05-15 18:10 GMT+02:00 Alistair Grant : > And if I execute the following in a playground: > > | ls | > OSSUnixSubprocess new > shellCommand: 'ls ~'; > redirectStdout; > runAndWaitOnExitDo: [ :process :outString | > ls :=

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Alistair Grant
On Mon, May 15, 2017 at 04:10:17PM +, Alistair Grant wrote: > On Mon, May 15, 2017 at 08:14:44AM -0700, Eliot Miranda wrote: > > > > > > On Mon, May 15, 2017 at 8:09 AM, Damien Pollet > > wrote: > > > > My point was, if #shellCommand: accepts a single string

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Alistair Grant
On Mon, May 15, 2017 at 08:14:44AM -0700, Eliot Miranda wrote: > > > On Mon, May 15, 2017 at 8:09 AM, Damien Pollet > wrote: > > My point was, if #shellCommand: accepts a single string for a whole > command, then surely it passes it to a system shell already,

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Sven Van Caekenberghe
> On 15 May 2017, at 18:03, Denis Kudriashov wrote: > > > 2017-05-15 16:55 GMT+02:00 K K Subbu : > What exactly are you trying to do? If you want the list of entries in ~ > directory, you could use FileDirectory methods: > > (FileDirectory on:

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
2017-05-15 16:55 GMT+02:00 K K Subbu : > What exactly are you trying to do? If you want the list of entries in ~ > directory, you could use FileDirectory methods: > > (FileDirectory on: (OSProcess thisOSProcess environmentAt: 'HOME')) > entries collect: [ :f | f name ]. >

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Eliot Miranda
On Mon, May 15, 2017 at 8:09 AM, Damien Pollet wrote: > My point was, if #shellCommand: accepts a single string for a whole > command, then surely it passes it to a system shell already, so why nest a > bash in between? (effectively running the equivalent of sh -c "bash

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Damien Pollet
My point was, if #shellCommand: accepts a single string for a whole command, then surely it passes it to a system shell already, so why nest a bash in between? (effectively running the equivalent of sh -c "bash -c \"ls ~\"') On 15 May 2017 at 16:28, Eliot Miranda wrote:

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread K K Subbu
On Monday 15 May 2017 05:46 PM, Denis Kudriashov wrote: OSSUnixSubprocess new shellCommand: 'ls ~'; redirectStdout; runAndWaitOnExitDo: [ :process :outString | ^outString ]. What exactly are you trying to do? If you want the list of entries in ~ directory, you could use FileDirectory

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Eliot Miranda
Hi Damien, > On May 15, 2017, at 6:44 AM, Damien Pollet wrote: > >> On 15 May 2017 at 15:26, Eliot Miranda wrote: >> Try something like >> >> shellCommand: 'bash -c ''ls ~'''; > > But then that would run ls inside of bash inside of

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Damien Pollet
On 15 May 2017 at 15:26, Eliot Miranda wrote: > Try something like > > shellCommand: 'bash -c ''ls ~'''; > But then that would run ls inside of bash inside of the system shell (/bin/sh), wouldn't it? What's the point? -- Damien Pollet type less, do more [ | ]

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Eliot Miranda
> On May 15, 2017, at 5:16 AM, Denis Kudriashov wrote: > > > 2017-05-15 14:04 GMT+02:00 Mariano Martinez Peck : >> Denis, you can also have shortcut methods to call shell from OSSubprocess. >> See the tests under "tests - shell" protocol. > > I

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
2017-05-15 14:04 GMT+02:00 Mariano Martinez Peck : > Denis, you can also have shortcut methods to call shell from OSSubprocess. > See the tests under "tests - shell" protocol. I tried this: OSSUnixSubprocess new shellCommand: 'ls ~'; redirectStdout; runAndWaitOnExitDo: [

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Mariano Martinez Peck
Denis, you can also have shortcut methods to call shell from OSSubprocess. See the tests under "tests - shell" protocol. Cheers, On Mon, May 15, 2017 at 8:00 AM, Denis Kudriashov wrote: > > 2017-05-15 12:13 GMT+02:00 K K Subbu : > >> ~ is a shell

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
2017-05-15 12:10 GMT+02:00 teso...@gmail.com : > Hi Denis, >the ~ (tilde) is expanded by the shell, a running process should expand > it. In the case of the command line tools they don't expand it, as they > expect the shell to expand it before calling. > > Check

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread K K Subbu
On Monday 15 May 2017 03:31 PM, Denis Kudriashov wrote: It returns empty string and console report: ls: cannot access ~: No such file or directory Any idea why it not works properly? (from command line "ls ~" returns expected files). ~ is a shell language synonym for $HOME. Both are

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread teso...@gmail.com
Hi Denis, the ~ (tilde) is expanded by the shell, a running process should expand it. In the case of the command line tools they don't expand it, as they expect the shell to expand it before calling. Check https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html and

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
Little problem which I not understand. Maybe you can explain. Path '~' is not recognizied in ls command: OSSUnixSubprocess new command: '/bin/ls'; arguments: #('~'); redirectStdout; runAndWaitOnExitDo: [ :process :outString | outString ]

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-15 Thread Denis Kudriashov
I just checked. It works perfectly. One notice for API: OSSUnixSubprocess new command: '/bin/ls'; arguments: #('-la' '/Users'); redirectStdout; runAndWaitOnExitDo: [ :process :outString | outString ] Why you are not return result of

Re: [Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-12 Thread Mariano Martinez Peck
I don't know. Can you at least try for the first time in a 32 bits ARM ? On Fri, May 12, 2017 at 5:00 AM, Denis Kudriashov wrote: > Hi. > > I decided to ask before I will try it. > > Best regards, > Denis > -- Mariano http://marianopeck.wordpress.com

[Pharo-dev] Does OSSubprocess works on ARM vm?

2017-05-12 Thread Denis Kudriashov
Hi. I decided to ask before I will try it. Best regards, Denis