Good. I think the problem with threads at startup was on e.g. Solaris. Did you test there?
I don't know that this makes the "start a new pike process" convenience function obsolete or not. Any thoughts?
It doesn't. It's useful to start new pike scripts at any time in a multithreaded application. fork only works at startup before any threads are started.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-12-17 02:29: Subject: fork()ing into background (was Pike 7.6)
OK, I've done a quick test on 7.5.15, and it does appear that fork() is functional at startup, as mast had mentioned. The following code seems to leave me in the background:
bash-2.05$ more test.pike int main() { werror("starting fork...\n"); if(fork()) { werror("not the new copy.\n"); return 0; } werror("done.");
call_out(c, 5); return -1; }
void c() { write("still running...\n"); call_out(c, 5); }
So it looks like one more item can be scratched from the 7.6 TODO list. I don't know that this makes the "start a new pike process" convenience function obsolete or not. Any thoughts?
Bill
/ Brevbäraren