On Saturday 31 October 2009 21:52:37 Peter Steele wrote:
In UNIX it is not safe to perform arbitrary actions after forking a
multi-threaded process. You're basically expected to call exec soon
after the fork, although you can do certain other work if you are very
careful.
The reason for
On Sat, Oct 31, 2009 at 4:55 PM, Kris Kennaway k...@freebsd.org wrote:
Peter Steele wrote:
I have an application running a number of threads. I've had recent
instances where the code below is causing a core dump to occur:
char fstatCmd[200];
char *fstatOut = /tmp/fstat.out;
I have an application running a number of threads. I've had recent instances
where the code below is causing a core dump to occur:
char fstatCmd[200];
char *fstatOut = /tmp/fstat.out;
sprintf(fstatCmd, fstat | grep -v USER | wc -l %s, fstatOut);
rc = system(fstatCmd);
The call is simply
Peter Steele wrote:
I have an application running a number of threads. I've had recent instances
where the code below is causing a core dump to occur:
char fstatCmd[200];
char *fstatOut = /tmp/fstat.out;
sprintf(fstatCmd, fstat | grep -v USER | wc -l %s, fstatOut);
rc = system(fstatCmd);
The
In UNIX it is not safe to perform arbitrary actions after forking a
multi-threaded process. You're basically expected to call exec soon after the
fork, although
you can do certain other work if you are very careful.
The reason for this is that after the fork, only one thread will be running in