OSProcess - return value from command.

David T. Lewis lewis at mail.msen.com
Thu Oct 25 01:18:12 UTC 2007


For example:

	command := PipeableOSProcess command: 'svn list svn://server/repo'.
	output := command output inspect.
	error := command errorPipelineContents inspect.
	processExitStatus := command processProxy exitStatus inspect.

The PipeableOSProcess class is part of the CommandShell package, because
it provides the mechanism for connecting external processes to OS pipes
for command line processing in CommandShell. I split the original OSProcess
package into two pieces (OSProcess and CommandShell) because it had grown
too large, and because simulating Unix command shells is not of general
interest to most Squeak users. However this is a recurring question, so
I guess I should find a way to move PipeableOSProcess back into the
OSProcess package one of these days.

Dave

On Wed, Oct 24, 2007 at 06:26:51PM +0100, Gary Chambers wrote:
> You need to use a PipeableOSProcess... should have come to me first, half
> the cost... :-)
> 
> > -----Original Message-----
> > From: squeak-dev-bounces at lists.squeakfoundation.org
> > [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of John
> > Thornborrow
> > Sent: 24 October 2007 5:37 PM
> > To: squeak-dev at lists.squeakfoundation.org
> > Subject: OSProcess - return value from command.
> >
> >
> > Hello All,
> >
> > I've been trying to use OSProcess to execute commands; which works -
> > however I need to be able to retrieve the value returned to the terminal
> >  by the command.
> >
> > To be precise, I am executing:
> >
> > OSProcess command: 'svn list svn://server/repo'
> >
> > and would like to retrive the string that is returned to the terminal.
> >
> > Could anyone advise on how to achieve this?
> >
> > Many thanks,
> >
> > John
> > www.pinesoft.co.uk
> >
> >
> > Pinesoft Computers are registered in England, Registered number:
> > 2914825. Registered office: 266-268 High Street, Waltham Cross,
> > Herts, EN8 7EA
> >
> >
> >
> > This message has been scanned for viruses by BlackSpider
> > MailControl - www.blackspider.com
> >
> >
> 



More information about the Squeak-dev mailing list