]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE140-solaris10-afsd-waitpid-to-clean-contract-20051013
authorChas Williams <chas@cmf.nrl.navy.mil>
Thu, 13 Oct 2005 22:01:49 +0000 (22:01 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 13 Oct 2005 22:01:49 +0000 (22:01 +0000)
FIXES 22317

it seems like this might be a bug in solaris10 when handling contracts
of exiting chilren who have created kernel threads.  the rxlistener is
a kernel thread on solaris and the child that starts the kernel_thread
returns and exits.

(cherry picked from commit ae7d5f250d96b7350ee369a74f71a89d646ddccc)

src/afsd/afsd.c

index ebb1450baddb1d767d6c713ee858e23919de05c7..7c753a0ebf442fd7e2f805bad7ba506e13575d03 100644 (file)
@@ -78,6 +78,7 @@ RCSID
 #include <errno.h>
 #include <sys/time.h>
 #include <dirent.h>
+#include <sys/wait.h>
 
 
 #ifdef HAVE_SYS_PARAM_H
@@ -1747,6 +1748,9 @@ mainproc(as, arock)
                     enable_process_stats);
        exit(1);
     }
+#ifdef AFS_SUN510_ENV
+    waitpid((pid_t) -1, NULL, 0);
+#endif
 #endif
     if (afsd_verbose)
        printf("%s: Forking rx callback listener.\n", rn);