needed one OSProcessPlugin for darwin/osx

David T. Lewis lewis at mail.msen.com
Sat Mar 4 23:18:10 UTC 2006


Thanks John,

A key question is whether forking a simple process works:

    "(UnixProcessTestCase selector: #testRunCommand) run"

Forking a running Squeak image is a rather tricky business. By
contrast, a fork-and-exec to run an external program is simple,
and has a good chance of working as long as we steer clear of
the pthreads signal handling for the time being.

Let me know if #testRunCommand passes.

Dave


On Sat, Mar 04, 2006 at 02:22:40PM -0800, John M McIntosh wrote:
> Ok, I'm running a few tests this am, mind perhaps there are no OS-X  
> OSProcessPlugin users out there?
> however thank you for taking the time to look into this.
> 
> First I went in and mangled MacOSProcessAccessor and MacProcess to  
> remove the overrides for access to unix superclass logic
> then I prim failed the forksqueak prim call, and made the suggested  
> change to UnixOSProcessAccessor>>canForwardExternalSignals
> 
> Testing
> 
> UnixProcessAccessorTestCase>testIsExecutableForUserInGroup
> accessor isExecutable: '/tmp/delete.me'
> 					forUser: 99999
> 					inGroup: accessor primGetGid
> fails, but I'll note:
> -r-xr-x---   1 johnmci  wheel  0 Mar  4 13:47 /tmp/delete.me
> 
> testIsReadableForUserInGroup
> didn't look likely related to above
> testIsWriteableForUserInGroup
> didn't look likely related to above
> 
> testChDir
> for this accessor primGetCurrentWorkingDirectory
> returns /private/tmp on the mac
> 
> UnixProcessFileLockingtestCase
> wants to fork a headless squeak....
> They all fail then...
> 
> UnixProcessFileLockTestcase
> They all RUN (GREEN)
> 
> UnixProcessTestCase
> 5 run, 13 error because they all attempt to fork a squeak vm.
> 
> Likely I should look at the ancient  code for headless squeak, if  
> there is any visible demand?
> 
> On 4-Mar-06, at 7:28 AM, David T. Lewis wrote:
> 
> > On Thu, Mar 02, 2006 at 12:33:02AM -0800, John M McIntosh wrote:
> >> ok, after some clues from David I built a mostly broken unix vm,
> >> however it was enough to build a OSProcessPlugin as a side effect.
> >>
> >> In testing I see that calling primitiveForkSqueakWithoutSigHandler
> >> crashes things, I'll suspect forking the carbon vm is a no no.
> >
> > Hi John,
> >
> > If you have a chance, could you please try something for me?
> > Change the method UnixOSProcessAccessor>>canForwardExternalSignals
> > to answer false, then save your image and restart.
> 
> --
> ======================================================================== 
> ===
> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ======================================================================== 
> ===
> 



More information about the Squeak-dev mailing list