[Vm-dev] behavior issues with windows vm?
Andreas Raab
andreas.raab at gmx.de
Fri Jun 19 06:06:10 UTC 2009
Hi John -
I fail to see where this is an issue with the Windows VM. Can you elaborate?
Cheers,
- Andreas
John M McIntosh wrote:
>
> Given a Pharo0.1Core-10204.image
>
> with the following changes to collect startup times in
> SystemDictionary>>send: toClassesNamedIn: with:
>
> Seem simple?
>
> I hacked usage of FilePackage log: because it was simple and wanted to
> record times & progress to a file in the VM directory.
>
> But the windows VM coughs up
> the dialog saying the file does not exist, create a new file or choose
> another file.
> This does not happen on mac or linux?
>
> The file is not created via the hopeful code in the modified
> FilePackage>>logFileStream
>
> It does not write a debug log, does not allow mouse clicks, keyboard
> entry etc, in general it's obvious to any input activity at this point.
>
> Now I wondering here if sandboxing for etoys is leaping in and being nasty?
> Is there some magical call that is done later in the startup: processing
> that ok's the ability to create files?
> And that I *know* later after system startup I *can* invoke FilePackage
> log: 'foo' and we are happy if I rip out the file access in log:
>
>
> Oh and I'm here because WikiServer wouldn't start on Windows, well
> because I've ripped out lots of eToy stuff, like the
> the eToy startup security sandboxing which isn't needed on the iPhone.
>
>
>
> changes to base 10204 image
>
>
> SystemDictionary>>send: startUpOrShutDown toClassesNamedIn:
> startUpOrShutDownList with: argument
> "Send the message #startUp: or #shutDown: to each class named in the
> list.
> The argument indicates if the system is about to quit (for
> #shutDown:) or if
> the image is resuming (for #startUp:).
> If any name cannot be found, then remove it from the list."
>
> | removals class t6 t7 |
> removals := OrderedCollection new.
> startUpOrShutDownList do:
> [:name |
> class := self at: name ifAbsent: [nil].
> class == nil
> ifTrue: [removals add: name]
> ifFalse: [class isInMemory ifTrue:
> [t6 := Time millisecondClockValue.
> class perform: startUpOrShutDown with: argument.
> startUpOrShutDown = #startUp:
> ifTrue: [t7 := class printString , ' ' ,
> (Time millisecondClockValue - t6) printString.
> FilePackage log: t7]]]].
>
> "Remove any obsolete entries, but after the iteration"
> startUpOrShutDownList removeAll: removals
>
>
>
> FilePackage>>logFileStream
> LogFileStream
> ifNil: [LogFileStream := StandardFileStream forceNewFileNamed:
> 'ConflictChecker.log'.
> LogFileStream setToEnd].
> LogFileStream closed
> ifTrue: [LogFileStream reopen.
> LogFileStream setToEnd].
> ^ LogFileStream
>
>
> Oh at shutdown: time we need to do a FilePackage closeLog, where that
> happens is an exercise for the reader.
>
>
>
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com> Twitter:
> squeaker68882
> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
More information about the Vm-dev
mailing list