@miconda — have you had the chance to consider a better solution to this issue? I am thinking of going through the various modules and see how they check for rank:
/* ???? have an escape for a module if the module needs to do * does something for PROC_INIT, PROC_MAIN and rank > 0 (and small negative integers PROC_TCP etc) * then do nothing and return here ???? */ if (rank < PROC_MAIN_ONLY) return 0; // PROC_MAIN_ONLY == -128
Then to apply this PR I could set
PROC_POST_FORK = -129 // other new ranks can be created with values < -128 and all modules would not be affected