Can you freeze a C/C++ process and continue it on a different host?

前端 未结 9 1308
栀梦
栀梦 2021-02-14 02:11

I was wondering if it is possible to generate a \"core\" file, copy if to another machine and then continue execution of the a core file on that machine?

I have seen the

9条回答
  •  一个人的身影
    2021-02-14 03:11

    This won't, in general, be sufficient to let an arbitrary process continue on another machine. In addition to the heap and stack state, there may also also open I/O handles, allocated hardware resources, etc. etc.

    Your options are either to explicitly write your software in a way that lets it dump state on a signal and later resume from the dumped state, or to run your software in a virtual machine and migrate that to the alternate host - Xen and Vmware both support freeze/restore as well as live migration.

    That said, CryoPID attempts to do precisely this and occasionally succeeds.

提交回复
热议问题