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

前端 未结 9 1256
栀梦
栀梦 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 02:56

    There are lots of reasons you can't do what you want very easily. For example, when you restore the core file on the other machine how do you resolve file descriptors that you process had open? What about sockets, named pipes, semaphores, or any other OS-level resource? Basically unless your system is specifically designed to handle such an operation you can't naively dump a core file and move it to another machine.

提交回复
热议问题