needed one OSProcessPlugin for darwin/osx

David T. Lewis lewis at mail.msen.com
Tue Feb 28 12:01:47 UTC 2006


On Mon, Feb 27, 2006 at 10:57:45AM -0800, John M McIntosh wrote:
> in my spare time today I was going to run the Sunits for OSProcess  
> under mac carbon 3.8.10b15.
> However I'm unable to find a version of the plugin anywhere and I'm a  
> bit lazy and don't want to
> face the hassle of trying to build a plugin from scratch. Therefore  
> if someone has a pre-build plugin for os-x
> somewhere please email a link or how to obtain it.

Hi John,

In case you don't get someone to send a pre-built OSPP:

If you are building a VM with VMMaker, I would expect that adding
OSPP to the build should be pretty easy. I'm not familiar with the
Mac, but here is more or less what I think you'll need to know:

- There are no external support files or additional headers required.

- Get OSProcessPlugin from SqueakMap. If the carbon VM supports
Ian's asynchronous IO routines, then also grab AioPlugin. If X window
is of any interest, then also grab XDisplayControlPlugin.

- You will need to put FilePlugin.h and SocketPlugin.h in the build
path for OSPP (and for AioPlugin if you build that).

- You will need to include the sqaio.h file from the unix platform
sources for both OSPP and AioPlugin, and also define SQAIO_H to point
to this file (#define SQAIO_H "sqaio.h"). This is in OSPP only for
backward compatibility, but you still need to have it for the build.
The #define is also for backward compatibility, as the file used
to be named "aio.h" rather than "sqaio.h".

- If you build XDisplayControlPlugin, you'll need to get the X headers
and libraries into the build and link paths. I don't know how this
would be done on the Mac, but the acinclude.m4  Makefile.inc files
in platforms/unix/plugins/XDisplayControlPlugin might provide a hint.

As far as I know, that should be all you need to build the plugins.

When you run the tests, I'd suggest that you load both OSProcess
and CommandShell, because CommandShell will add a lot of additional
unit tests when you run "OSProcess allTestResults". Get the latest
version of both packages, as I recently added a few tweaks to make
the tests fail more gracefully on Mac.

The unit tests will write a results file when they are completed, but
there is a pretty good chance that they will not get that far if one
of the tests hangs up due to pthread signal handling problems (and I
think this is quite likely). However, you will also get useful output
written to stdout as the tests run, so if you can run the VM from a
console window on the Mac, you should be able to see the output there
(and capture it to a file). Or course you can also run the unit tests
in the usual manner with the test runner.

I do not expect that you will find endianness problems. I do expect
that there will be problems related to signal handling and errno
handling with pthreads, as I have not done anything in OSPP to
accomodate this.  Most notably, the Squeak process that handles
child process exit status relies on catching the SIGCHLD signal
and signaling a Squeak semaphore.  This may not work properly in
a pthread environment, as the SIGCHLD may not be delivered to the
right pthread.

Dave




More information about the Squeak-dev mailing list