Spawning Posix compatible system process and Dispatching tasks to multiple VMs
Switch branches/tags
Nothing to show
Clone or download
Latest commit e483a6c Dec 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BaselineOfSystemProcess add baselineof Oct 18, 2018
SystemProcess rename class Dec 5, 2018
.project initial commit Oct 18, 2018
.properties initial commit Oct 18, 2018
LICENSE Create LICENSE Oct 18, 2018
README.md Update README.md Dec 7, 2018

README.md

SystemProcess

  • Spawning Posix compatible system process using posix_spawn
  • Dispatching code to multiple VMs, each VM runs on a separated system process. Inter-processes communication via shared memory

Install

Metacello new
	repository: 'github://lxsang/SystemProcess';
	baseline:'SystemProcess';
	load

Process spawn Example

Execute a command and redirect its stdout

|o|
o:= SystemProcess new.
o redirectStdout.
o onOutputDo: [
	:d| Transcript show: d
].
o onFinishDo: [ o cleanup ].
o shellCommand: { 'ls'. '-al' }.

Execute a command and redirect its stdin, stdout:

|o crlf|
crlf := Character cr asString, Character lf asString.
o:= SystemProcess new.
o redirectStdout.
o redirectStdin.
o onOutputDo: [
	:d| Transcript show: d
].
o onFinishDo: [ o cleanup ].
o shellCommand: { '/bin/sh'}.
o stdinStream nextPutAll: 'ls -al', crlf.
"exit /bin/sh"
o stdinStream nextPutAll: 'exit',crlf

InterVM example

Please refer to this post: https://blog.lxsang.me/post/id/25