=== Top of the Swiki === Attachments ===
Updated
OSProcess 1.1 for Squeak 2.7
Sun Jan 30 09:02:08 EST 2000 David T Lewis
OSProcess 1.1
Previous released version: 0.4
This is the update of OSProcess for Squeak 2.7.
Files in the zip archive:
- OSProcessV1-1.cs - the change set
- UnixOSProcessAccessor.c: from UnixOSProcessAccessor>>translateDoInlining: true
- sqXWindow.c.2.7.diff: Diff relative to the base Squeak 2.7 version
- sqXWindow.c.2.7+.diff: Diff relative to Ian's development version
- sqXWindow.c: file with diffs already applied
OSProcess provides access to the external operating system from Squeak. A plugin is provided for Unix (and Linux) systems. Placeholder classes are provided in the OSProcess hierarchy for other operating systems (Windows, Mac, OS/2), but no support for these systems is yet implemented.
You can:
- Open a inspector on OSProcess>>thisOSProcess.
- Read or write on the stdin, stdout, and stderr streams.
- Access the environment and command line.
- Fork and exec external programs, with control of the command line, environment, and stdin/stdout/stderr.
- Create pipes and connect them to external processes.
- Fork an exact clone of the current running Squeak image (no image file).
- Fork another Squeak from a disk based image.
- Start a headless Squeak from the running Squeak image, giving it an expression to evaluate.
- Tell the running image to go headless with: UnixProcess>>decapitate.
- Restart the VM on the fly with UnixProcess>>restartVirtualMachine.
- Start your Swiki in a headless background process:
UnixProcess>>startSwiki: 'myswiki' onPort: 8081 loggingTo: 'log.txt'
Changes since 0.4:
- Modifications no longer required for Squeak header files (a modified version of Ian's sqXWindow.c is still required).
- Additional examples and utility methods. See the examples in class OSProcess, class UnixProcess, and class ShellWindow. See also the utilities category in class UnixProcess.
Building the plugin:
- Start with a copy of Ian's Squeak 2.7 VM code.
- Add the modified sqXWindow.c.
- Recompile the VM.
- Load the change set into Squeak. The C code for the plugin (UnixOSProcessAccessor.c) will be created in your Squeak directory.
- Copy the modified sqXWindow.c into your source tree.
- Make a directory called 'UnixOSProcessAccessor' in your source tree. Copy UnixOSProcessAccessor.c into this directory.
- Build new VM and plugins (reconfigure, make, and make plugins).
- Move the new VM and UnixOSProcessAccessor.so module into their proper directories, and restart Squeak.