Summary: | multiprocessing.eclass: please support nesting of subprocesses | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | Eclasses | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | enhancement | CC: | sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michał Górny
2013-03-02 07:07:03 UTC
subsets of multijobs should not (cannot really) be responsible for managing the process count as they're all running in different env contexts. the first multijob_init to run will have to create a master process that exists just to maintain mj_num_jobs in the same environment. when the last multijob_finish runs, it will reap that process. you can keep track of this by using an internal var set to $BASHPID. once that's isolated, i don't think any of the other code needs changing. the fact that they're in subshells provides all the isolation we need. i see that we currently leak mj_control_fd. we should probably have both multijob_{init,finish} close that. |