From: Pascal Bourguignon
Subject: saving/resuming images with open resources.
Date: 
Message-ID: <87r7mlo0gd.fsf@thalassa.informatimago.com>
Martin Cracauers raises at the end of:

    http://www.cons.org/cracauer/lisp-threads.html

the question of save-and-stoping/resuming images maybe containing
several threads, with respect to open files, terminals, sockets, etc.
That question occurs also for example in Eros (http://www.eros-os.org).

I don't think you can in general handle automatically the process of
restauring open resources. Like with the EINTR errno of unix, you need
to have a way to signal the process that a resource is not available
anymore. Then user-level handlers can proceed depending on the purpose
of the application and the kind of resource.  A library could provide
some default handler that would check that a regular file resource has
not changed (a checksum at suspend time compared to a checksum at
resume time, or some support from the OS assuring us that the file did
not change), and the re-open it and reposition. Some default handling
of interactive streams could be provided too, but obviously, it would
not be possible to do the same for network sessions.  Even in the case
of interactive streams, security considerations (is the terminal
connected to the same user?)  would motivate the application to
provide its own handlers.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.