needs a tester with an SMP 7.0 box
Julian Elischer
julian at elischer.org
Thu Jan 31 11:29:31 PST 2008
if you have a 7.0 SMP (8 way if possible) box and can stand
a little down time, I'm looking for someone to test the following:
This snippet may freeze the process after a while:
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
void *forker (void *arg) {
while (1) {
pid_t pid = fork();
if (pid == 0) {
exit(0);
} else if (pid > 0) {
int status;
waitpid(pid, &status, 0);
} else {
printf("Fork failed\n");
abort();
}
}
}
int main(void) {
int i = 0;
for (i = 0; i < 4; i++) {
pthread_t thr;
pthread_create(&thr, NULL, forker, NULL);
pthread_detach(thr);
}
while(1)
sleep(1000);
}
with the following patch applied:
http://www.freebsd.org/~julian/kse-7.diff
it should not.
can someone with a 7.0 machine please confirm this?
(requires a recompile of libkse and linking with libkse.)
(you could call it something else for the test).
More information about the freebsd-current
mailing list