NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/53998 CVS commit: src/sys



The following reply was made to PR kern/53998; it has been noted by GNATS.

From: Christos Zoulas <christos%zoulas.com@localhost>
To: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: kern-bug-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 joel.bertrand%systella.fr@localhost
Subject: Re: PR/53998 CVS commit: src/sys
Date: Sat, 9 Mar 2019 22:19:16 -0500

 This is not a bug. Nobody is waiting for those processes (they all end =
 up zombies), so eventually you run out.
 
 [10:18pm] 2463>diff -u semaphore.c{,.new}
 --- semaphore.c 2019-03-09 22:18:25.682843288 -0500
 +++ semaphore.c.new     2019-03-09 22:18:11.078956324 -0500
 @@ -5,6 +5,7 @@
  #include <semaphore.h>
  #include <pthread.h>
  #include <string.h>
 +#include <sys/wait.h>
 =20
  #define NUMBER_OF_THREADS      8
 =20
 @@ -22,6 +23,7 @@
  thread(void *arg)
  {
         char                    **arguments;
 +       int status;
 =20
         pid_t                   pid;
         thread_arg_t    *ta =3D arg;
 @@ -75,6 +77,7 @@
                 perror("sem_destroy()");
                 _exit(EXIT_FAILURE);
         }
 +       wait(&status);
 =20
         ta->active =3D false;
         pthread_exit(NULL);
 


Home | Main Index | Thread Index | Old Index