Triggering image save (was: [Vm-dev] Re: RFC: Unix 3.11.3-2116 VM)

David Farber dfarber at
Wed Sep 2 00:55:15 UTC 2009

On Sep 1, 2009, at 6:23 PM, David T. Lewis wrote:

> This is probably redundant with what Ian previously described, but  
> here
> is another way to set up your image to do a save when you send SIGUSR2
> to the vm. The image save has little or no impact on the running image
> (i.e. no pause while the files are being written) because it is done
> in a background OS process.
>   sigUsr2Semaphore := OSProcess accessor forwardSigUsr2.
>   sigWatcher := [[sigUsr2Semaphore wait.
>     UnixProcess saveImageInBackgroundNicely.
>     (Delay forSeconds: 30) wait] repeat] fork.
> This would need to be run at image startup, because #forwardSigUsr2
> sets the signal handler only for the duration of the current session.
> I guess you could also use cron to schedule periodic image saves.

Thanks Dave.  I've seen your previous posts where you've recommended  
saveImageInBackgroundNicely and had already planned to take that  
route next time I deploy a Seaside app.  And yes, I'll use cron to  
fire off nightly backups.


More information about the Vm-dev mailing list