that the way to control is quite an awkward one. I would like to have some internal control, probably overwritable via environment variable.
In case you hadn't though of this workaround:
if(getenv("VAR") == 0) putenv("VAR=defaultvalue");
Not to say a programmatic method is not worthwhile.
I was thinking of this way, and had to reject it. First of all putenv is not an ANSI C function. Second, it is still quite far from a clean soultion. In fact after I posted original question, I found a good way to solve this problem -- boost::execution_monitor. It looks like an ultimate solution to all my problems. Have not tried it yet though, but will certainly do it soon. One can think of program execution manager as a mere example how to use a boost::execution_monitor. - Kirill