How to create a Process that outlives its parent

前端 未结 3 1244
栀梦
栀梦 2020-11-30 13:35

I\'m trying to launch an external updater application for a platform that I\'ve developed. The reason I\'d like to launch this updater is because my configuration utility w

3条回答
  •  孤城傲影
    2020-11-30 14:30

    Just a thought from my foggy memory, but I seem to remember having a discussion a while back that when the Process.Start method is called from Form that the spawned process has some sort of dependency (not sure what, why or how, memory is a bit foggy).

    To deal with it, a flag was set that was actually called from the Main() method of the application after the main form/app exited and that if the process was launched from the Main() method, eveything worked out just fine.

    Just a thought, like I said, this is purely from memory, but some of the examples posted here all being called from the Main() method of a console app seemed to jog something.

    Hope all works out well for you.

提交回复
热议问题