Faster forking of large processes on Linux?

前端 未结 5 823
刺人心
刺人心 2020-12-01 00:31

What\'s the fastest, best way on modern Linux of achieving the same effect as a fork-execve combo from a large process ?

My proble

5条回答
  •  孤城傲影
    2020-12-01 01:01

    If you know the number of subprocess ahead of time, it might be reasonable to pre-fork your application on startup then distribute the execv information via a pipe. Alternatively, if there is some sort of "lull" in your program it might be reasonable to fork ahead of time a subprocess or two for quick turnaround at a later time. Neither of these options would directly solve the problem but if either approach is suitable to your app, it might allow you to side-step the issue.

提交回复
热议问题