Closed liuaifu closed 4 months ago
@liuaifu you can use an action-script to create a file that indicates the current process has been restored. Then is_restored_from_checkpoint()
could return true
if this file exists and false
otherwise.
Got it. Thank you.
There is actually one more option I recently found, it's with external file descriptors "debug" mode https://criu.org/Inheriting_FDs_on_restore#Debugging_aid
Upd: sorry, no --inherit-fd 'debug[0]:test'
works a bit differently, it writes debug string into file descriptor of criu process.
I use criu to dump and restore my app, and everything works. But my program needs to perform some specific actions when it is restored. How can I detect the event that is restored? Thank you.