summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1997-12-07 18:16:43 +0000
committersef <sef@FreeBSD.org>1997-12-07 18:16:43 +0000
commitdf8959040c85f44e820fb5edb8f8f65fe23c8ed0 (patch)
tree476b4682cdd1088c2429f725f563702931c1756e
parent92dcad637d57bd85d71cdebbfa3308cf5c417bcb (diff)
downloadFreeBSD-src-df8959040c85f44e820fb5edb8f8f65fe23c8ed0.zip
FreeBSD-src-df8959040c85f44e820fb5edb8f8f65fe23c8ed0.tar.gz
Surround the call to procfs_exit() by #ifdef PROCFS/#endif -- much to my
surprise, procfs actually is optional, and some people truly do generate kernels without it. Wow. I built a kernel without 'options PROCFS' and it compiled and linked.
-rw-r--r--sys/kern/kern_exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index d282d22..88c78a1 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
- * $Id: kern_exit.c,v 1.60 1997/11/20 19:09:43 bde Exp $
+ * $Id: kern_exit.c,v 1.61 1997/12/06 04:11:10 sef Exp $
*/
#include "opt_ktrace.h"
@@ -114,7 +114,9 @@ exit1(p, rv)
register struct proc *q, *nq;
register struct vmspace *vm;
ele_p ep = exit_list;
+#ifdef PROCFS
extern void procfs_exit(pid_t);
+#endif
if (p->p_pid == 1) {
printf("init died (signal %d, exit %d)\n",
@@ -159,11 +161,13 @@ exit1(p, rv)
#endif
STOPEVENT(p, S_EXIT, rv);
+#ifdef PROCFS
/*
* Now that we're back from stopevent(), force a close
* of all open procfs files for this process.
*/
procfs_exit(p->p_pid);
+#endif
/*
* Check if any LKMs need anything done at process exit.
OpenPOWER on IntegriCloud