Add copyright
[unix-history] / usr / src / sys / kern / kern_fork.c
index 6e2abc4..8878cad 100644 (file)
@@ -1,23 +1,29 @@
-/*     kern_fork.c     6.4     84/07/14        */
+/*
+ * Copyright (c) 1982 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)kern_fork.c 6.7 (Berkeley) %G%
+ */
 
 #include "../machine/reg.h"
 #include "../machine/pte.h"
 #include "../machine/psl.h"
 
 
 #include "../machine/reg.h"
 #include "../machine/pte.h"
 #include "../machine/psl.h"
 
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/map.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/kernel.h"
-#include "../h/proc.h"
-#include "../h/inode.h"
-#include "../h/seg.h"
-#include "../h/vm.h"
-#include "../h/text.h"
-#include "../h/file.h"
-#include "../h/acct.h"
-#include "../h/quota.h"
+#include "param.h"
+#include "systm.h"
+#include "map.h"
+#include "dir.h"
+#include "user.h"
+#include "kernel.h"
+#include "proc.h"
+#include "inode.h"
+#include "seg.h"
+#include "vm.h"
+#include "text.h"
+#include "file.h"
+#include "acct.h"
+#include "quota.h"
 
 /*
  * fork system call.
 
 /*
  * fork system call.
@@ -210,7 +216,7 @@ again:
        /*
         * Increase reference counts on shared objects.
         */
        /*
         * Increase reference counts on shared objects.
         */
-       for (n = 0; n < NOFILE; n++) {
+       for (n = 0; n <= u.u_lastfile; n++) {
                fp = u.u_ofile[n];
                if (fp == NULL)
                        continue;
                fp = u.u_ofile[n];
                if (fp == NULL)
                        continue;