-/* kern_proc.c 3.17 %G% */
+/* kern_proc.c 3.21 %G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/vm.h"
#include "../h/text.h"
#include "../h/psl.h"
+#include "../h/vlimit.h"
+#include "../h/file.h"
/*
* exec system call, with and without environments.
{
register sep;
register size_t ts, ds, ss;
- register int overlay;
+ int overlay;
int pagi = 0;
/*
goto bad;
}
if(u.u_exdata.ux_tsize!=0 && (ip->i_flag&ITEXT)==0 && ip->i_count!=1) {
- u.u_error = ETXTBSY;
- goto bad;
+ register struct file *fp;
+
+ for (fp = file; fp < &file[NFILE]; fp++)
+ if (fp->f_inode == ip && (fp->f_flag&FWRITE)) {
+ u.u_error = ETXTBSY;
+ goto bad;
+ }
}
/*