[Vm-dev] different behaviour for Carbon VM depending on how it's
John M McIntosh
johnmci at smalltalkconsulting.com
Thu May 1 14:30:17 UTC 2008
If the launch came from the Finder, the Carbon process serial number
is placed in argv (to see what I mean do a ps -ax and notice the -
Let me dig some more after I drop the teenager off at school.
On May 1, 2008, at 7:17 AM, Michael Haupt wrote:
> Dear all,
> today, I came across some interesting (and, so far, unsettling)
> behaviour of the Carbon VM (on Mac OS X, of course).
> The scenario is this: inside the image, OSProcess is used to start a
> Python script that goes to daemon state after some time. The command
> line passed to OSProcess>>#waitForCommand: is 'python
> /path/to/script.py -some -args'.
> Here's the interesting bit.
> The OSProcess has an exit value of 256 (and does not work) when I
> start the image the "normal" way, i.e., by double-clicking it, or by
> drag-and-dropping it to a VM, or by issuing "open -a
> /path/to/SqueakVM.app my.image". The VM process, as shown by "ps x",
> looks like this: "/path/to/Squeak VM Opt.app/Contents/MacOS/Squeak VM
> Opt -psn_0_4199425".
> Conversely, when I start the same image by first starting the VM,
> either by double-clicking it or by starting it directly from the
> terminal command line ("open /path/to/SqueakVM.app" or
> "/path/to/SqueakVM.app/Contents/MacOS/Squeak\ VM\ Opt"), and then
> selecting the image from the file selection dialogue, everything is
> fine. The VM process, then, looks like this: "/path/to/Squeak VM
> Opt.app/Contents/MacOS/Squeak VM Opt" (i.e., without the "-psn...").
> What is the difference, and why? I'm puzzled. Someone, please
> enlighten me. :-)
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Vm-dev