SCCS-vsn: sys/kern/kern_synch.c 4.9
SCCS-vsn: sys/kern/kern_proc.c 4.9
-/* kern_proc.c 4.8 %G% */
+/* kern_proc.c 4.9 %G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
{
register int (**rp)();
register i;
{
register int (**rp)();
register i;
-#ifdef UCBIPC
- register struct port *pt;
-#endif UCBIPC
long sigmask;
for(rp = &u.u_signal[0], sigmask = 1L; rp < &u.u_signal[NSIG];
long sigmask;
for(rp = &u.u_signal[0], sigmask = 1L; rp < &u.u_signal[NSIG];
u.u_ar0[PC] = u.u_exdata.ux_entloc + 2; /* skip over entry mask */
for(i=0; i<NOFILE; i++) {
if (u.u_pofile[i]&EXCLOSE) {
u.u_ar0[PC] = u.u_exdata.ux_entloc + 2; /* skip over entry mask */
for(i=0; i<NOFILE; i++) {
if (u.u_pofile[i]&EXCLOSE) {
closef(u.u_ofile[i]);
u.u_ofile[i] = NULL;
closef(u.u_ofile[i]);
u.u_ofile[i] = NULL;
-#else UCBIPC
- if (u.u_pofile[i]&ISPORT) {
- pt = u.u_oport[i];
- if (--pt->pt_count == 0)
- ptclose(pt);
- u.u_pofile[i] &= ~ISPORT;
- u.u_oport[i] = NULL;
- } else {
- closef(u.u_ofile[i]);
- u.u_ofile[i] = NULL;
- }
-#endif UCBIPC
u.u_pofile[i] &= ~EXCLOSE;
}
}
u.u_pofile[i] &= ~EXCLOSE;
}
}
register int i;
register struct proc *p, *q;
register struct file *f;
register int i;
register struct proc *p, *q;
register struct file *f;
-#ifdef UCBIPC
- register struct port *pt;
-#endif UCBIPC
register int x;
#ifdef PGINPROF
register int x;
#ifdef PGINPROF
p->p_flag &= ~SVFDONE;
}
for(i=0; i<NOFILE; i++) {
p->p_flag &= ~SVFDONE;
}
for(i=0; i<NOFILE; i++) {
f = u.u_ofile[i];
u.u_ofile[i] = NULL;
closef(f);
f = u.u_ofile[i];
u.u_ofile[i] = NULL;
closef(f);
-#else UCBIPC
- if (u.u_pofile[i]&ISPORT) {
- pt = u.u_oport[i];
- if (--pt->pt_count == 0)
- ptclose(pt);
- u.u_oport[i] = NULL;
- } else {
- f = u.u_ofile[i];
- u.u_ofile[i] = NULL;
- closef(f);
- }
-#endif UCBIPC
}
plock(u.u_cdir);
iput(u.u_cdir);
}
plock(u.u_cdir);
iput(u.u_cdir);
* not su and too many procs owned; or
* not su and would take last slot.
*/
* not su and too many procs owned; or
* not su and would take last slot.
*/
+ if (p2==NULL)
+ tablefull("proc");
if (p2==NULL || (u.u_uid!=0 && (p2==procNPROC-1 || a>MAXUPRC))) {
u.u_error = EAGAIN;
if (!isvfork) {
if (p2==NULL || (u.u_uid!=0 && (p2==procNPROC-1 || a>MAXUPRC))) {
u.u_error = EAGAIN;
if (!isvfork) {
-/* kern_synch.c 4.8 %G% */
+/* kern_synch.c 4.9 %G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
for(n=0; n<NOFILE; n++)
if(u.u_ofile[n] != NULL) {
for(n=0; n<NOFILE; n++)
if(u.u_ofile[n] != NULL) {
-#ifdef UCBIPC
- if (u.u_pofile[n] & ISPORT)
- u.u_oport[n]->pt_count++;
- else {
-#endif
- u.u_ofile[n]->f_count++;
- if(!isvfork && u.u_vrpages[n])
- u.u_ofile[n]->f_inode->i_vfdcnt++;
-#ifdef UCBIPC
- }
-#endif UCBIPC
+ u.u_ofile[n]->f_count++;
+ if(!isvfork && u.u_vrpages[n])
+ u.u_ofile[n]->f_inode->i_vfdcnt++;