[Pharo-project] OSProcess $PATH

David T. Lewis lewis at mail.msen.com
Fri Jun 17 22:33:35 EDT 2011


On Fri, Jun 17, 2011 at 12:59:27PM -0700, Sean P. DeNigris wrote:
> env := OSProcess thisOSProcess environment copy.
> path := (env at: #PATH), ':/opt/local/bin/'.
> env at: #PATH put: path.
> (PipeableOSProcess command: 'docsplit text "my_document.pdf"' environment:
> env workingDir: nil input: nil output: nil error: nil errorPipelineStream:
> nil) output
> 
> Sean

Exactly right.

See also #environmentAt:put: which uses a primitive to call the C library
putenv() to set the value in the environment of the process in which the
VM is running.

Dave





More information about the Pharo-dev mailing list