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.
This commit is contained in:
parent
62a1204bb6
commit
ed1b05436a
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user