needs a tester with an SMP 7.0 box

From: Julian Elischer <julian_at_elischer.org>
Date: Thu, 31 Jan 2008 11:17:42 -0800
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).
Received on Thu Jan 31 2008 - 18:29:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC