ITADN

Rokit link(runner) kills every child processes after finish

#88Closedjiwonz 创建于 2025-06-24
duplicate
J
jiwonzcommented
Like `rojo doc`(`opener::open("https://rojo.space/docs")?;`) should create a child process and allow the parent process to exit and the child process to continue(I'm not sure if my knowledge is correct, but anyway), but rokit forcely prevents this. The linked program(runner) will terminate and its child process will be killed. This can prevent some programs from working as intended, such as the `rojo doc` command(I think it's because something that opens a browser terminates the main parent process and its child processes are terminated as well.) For my program, for my main problem, I found that if I run [`ChildProcess.WaitForExit`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit?view=net-9.0) together, it works fine because the main parent process waits until the child process ends, and if I don't call `WaitForExit` together, similar to rokit doc, when the main parent process ends, the child process created by the parent process is also killed by rokit and nothing happens. If I don't run it through rokit it works as expected. (Sorry for the long explanation.)
关闭于 2025-06-25 1 条评论