[squeak-dev] Files | #startUp and #shutDown in FileDirectory

tim Rowledge tim at rowledge.org
Thu May 28 17:33:19 UTC 2020



> On 2020-05-26, at 11:58 PM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> ...or am I missing something? Tim (tpr)! You started it in 2003. Please, explain. :-D
> 
> Maybe ... we don't ever want to store dangling source-file handles in the image?

Wow, that's another ancient thing. I think yes, the desire to not have dangling potential-crap pointers would have driven that. You certainly don't want the saved image to get started up with with raw addresses to OS stuff. I can't find any emails mentioning it.

I *suspect* that back then we probably didn't have the extra bit of info to say if the image was being saved & quit, saved & resumed, started up, etc. If that was the case then it would sensible to shut down everything and restart it on returning to normal running.

If one has a suitable way to carry the information about what is happening then you might choose to make the startup-from-snaphsot code do the work of killing old pointers and (re)opening things. A save&resume could be allowed to keep things to save some time.  We could consider making a save&quit do a cleanup as a courtesy to the next time the saved image is started. It might be helpful to Dave's osprocess forking etc to do cleanup before the fork?

I haven't looked at this code in a long time, so maybe we are already near to doing this.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: YII: Yield to Irresistable Impulse




More information about the Squeak-dev mailing list