file locking primitive [PREANNOUNCE][HELP WANTED]

David T. Lewis lewis at
Wed Jan 7 00:59:27 UTC 2004

I have put the Unix file locking primitives into OSPP and added the required
support to OSProcess. Could some kind soul with an interest in this please
try it out and confirm that it works on your Unix/Linux system? I'd like to
get at least one confirmation before I update Squeak Map to point to the new

I am particularly interested to know if anyone is running a flavor of Unix
for which the new file locking primitives do *not* work, or for which
the plugin cannot be compiled. I do not want to break the existing Unix
support, and I am not completely certain how portable this stuff is.

If you can try this, please do the following:

1) Start with an image with VMMaker installed.
2) Load OSProcess directly from the OSProcess page on the swiki
   at <>. Install the new
   version 3.2.1 (not version 3.1 that Squeak Map is currently pointing at).
   Answer yes to the various questions, especially be sure to load
   CommandShell, but do *not* answer yes to download OSProcessPlugin.
3) Load OSProcessPlugin directly from the OSPP page on the swiki
   at <>. Install the new
   version 3.2 of OSPP (not version 3.1.1 that Squeak Map is pointing at).
4) Fire up VMMaker and build a new Unix OSPP plugin.
5) Open a TestRunner and run the UnixProcessFileLockTestCase sUnit tests.
6) Let us know what happens.

Be aware that the SUnit tests run a bunch of headless Squeaks in the
background to exercise the file locking, so in the unlikely (?) case that
something goes wrong, be sure to kill of these rogue Squeaks, or you are
likely to wonder where all the memory went on your computer.

Thanks in advance. If I have not heard any bad news by this coming weekend,
I'll go ahead and update the SM pages and hope for the best.


On Sun, Jan 04, 2004 at 10:52:09PM -0500, David T. Lewis wrote:
> On Fri, Jan 02, 2004 at 04:37:35PM -0800, Julian Fitzell wrote:
> > This has come up before but we need the file locking primitive in Squeak 
> > to support our work in OmniBase.  There has been enough interest in this 
> > in the past that I think it's worthwhile coming up with a primitive 
> > interface that is implementable in all the common VMs.
> FYI in case anyone else is working on this, I've just added file locking
> primitives to the Unix OSProcessPlugin and written some test cases using
> cooperating Squeak processes sharing locks on a file. I'm emulating the
> locking behavior of Win32 file locks (I think) using a file lock registry
> in the Squeak image.  It all seems to work fine, although the Win32
> emulation only makes sense within a single Squeak image (two cooperating
> images do not know about each other's registries), so I don't know if
> this is really a good idea or not.
> Anyway, Christmas holiday is over so I probably won't get it cleaned up
> and released on Squeak Map until next weekend. If anyone needs a copy
> sooner just let me know.
> Dave

More information about the Squeak-dev mailing list