[squeak-dev] OSProcess and Cuis: successes and failures, cumulative changes

Ross Boylan RossBoylan at stanfordalumni.org
Fri Sep 3 20:10:42 UTC 2010


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}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OSProcess-rb.1.cs
Type: application/mbox
Size: 4955 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100903/3e40c566/OSProcess-rb.1.bin


More information about the Squeak-dev mailing list