[squeak-dev] OSProcess and Cuis: successes and failures,
cumulative changes
David T. Lewis
lewis at mail.msen.com
Fri Sep 3 20:22:05 UTC 2010
Ross,
Thanks very much for this. I just started looking at your updates and
the change set will help a lot. FYI, it turns out that #ifNotNil: with
a block parameter is not portable to Squeak 3.6 so I will probably recode
a few things so that both Cuis and Squeak 3.6 will still be happy.
Thanks a lot,
Dave
On Fri, Sep 03, 2010 at 01:10:42PM -0700, Ross Boylan wrote:
> I've attached all the changes I've made to OSProcess. This includes new
> work that replaces #fork with #newProcess and #resume for those
> situations in which the return value might be used.
>
> It mostly does not have changes from #ifNotNilDo: to #ifNotNil:. So to
> run it in Cuis requires implementing ifNotNilDo:, or making the
> remaining changes from ifNotNilDo: to ifNotNil:. I think the
> changeset's one change to ifNotNil: is in a method that's activated
> during filein.
>
> Despite the work on fork, I'm still getting about the same number of
> test failures in Cuis 2.6 (recall OSProcess unaltered passed all tests
> in squeak 4.1). Adding in UnixProcessWin32FileLockingTestCase, there
> are 167 tests with 2 failures and 24 errors. All problems are in
> UnixProcess{Unix,Win32}FileLockingTestCase.
>
> I'm also starting to suspect that the apparent errors with the process p
> nil were artifacts of the debugging process. Typically the error is in
> tearDown
>
> | d |
> OSProcessAccessor emulateWin32FileLocking: self initialCompatibilitySetting.
> d := Delay forMilliseconds: 50.
> self fileStream close.
> self remoteProcess ifNotNilDo:
> [:p | p terminate.
> [p isComplete] whileFalse: [d wait].
> self remoteProcess: nil]
>
> In p terminate, p is undefined and terminate is not understood. This
> really doesn't make sense, since the block is only executed ifNotNilDo:
> and when I trace into it things seem OK. The final step sets the remote
> process to nil; perhaps by the time I bring up the debugger the old
> remote process is gone.
>
> Here's the code I put in ProtoObject
> ifNotNilDo: ifNotNilBlock
> "RB adds for back compatibility"
> "Evaluate the block, unless I'm == nil (q.v.)"
>
> ^ ifNotNilBlock valueWithPossibleArgs: {self}
>
More information about the Squeak-dev
mailing list
|