projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug in 2.6 caused by bizarre semantics of .am directive
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_proc.c
diff --git
a/usr/src/sys/kern/kern_proc.c
b/usr/src/sys/kern/kern_proc.c
index
1b752ac
..
879bd93
100644
(file)
--- a/
usr/src/sys/kern/kern_proc.c
+++ b/
usr/src/sys/kern/kern_proc.c
@@
-1,4
+1,4
@@
-/* kern_proc.c 3.
16
%G% */
+/* kern_proc.c 3.
21
%G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-17,6
+17,8
@@
#include "../h/vm.h"
#include "../h/text.h"
#include "../h/psl.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.
/*
* exec system call, with and without environments.
@@
-176,7
+178,7
@@
register struct inode *ip;
{
register sep;
register size_t ts, ds, ss;
{
register sep;
register size_t ts, ds, ss;
-
register
int overlay;
+ int overlay;
int pagi = 0;
/*
int pagi = 0;
/*
@@
-241,8
+243,13
@@
register struct inode *ip;
goto bad;
}
if(u.u_exdata.ux_tsize!=0 && (ip->i_flag&ITEXT)==0 && ip->i_count!=1) {
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;
+ }
}
/*
}
/*
@@
-685,7
+692,7
@@
sbreak()
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
- if (
u.u_dsize+d
> u.u_limit[LIM_DATA]) {
+ if (
ctob(u.u_dsize+d)
> u.u_limit[LIM_DATA]) {
u.u_error = ENOMEM;
return;
}
u.u_error = ENOMEM;
return;
}