Patch00146 was half baked; that only took into account one case, i.e.
mark text busy when it's running; the other case is when a binary is
*already* open for writing.
chris
Date: Mon, 24 May 93 05:58:35 -0700
AUTHOR: Chris Demetriou (cdg@sun-lamp.cs.berkeley.edu)
386BSD-Patchkit: patch00165
*
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
* -------------------- ----- ----------------------
*
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
* -------------------- ----- ----------------------
- * CURRENT PATCH LEVEL: 5 00146
+ * CURRENT PATCH LEVEL: 6 00165
* -------------------- ----- ----------------------
*
* 05 Aug 92 Paul Kranenburg Fixed #! as a magic number
* -------------------- ----- ----------------------
*
* 05 Aug 92 Paul Kranenburg Fixed #! as a magic number
* 10 Apr 93 Yoval Yarom Fix for busy text on executables
* 20 Apr 93 markie Stop execution of a file open for write
* Rodney W. Grimes Fix date on Yoval Yarom's patch
* 10 Apr 93 Yoval Yarom Fix for busy text on executables
* 20 Apr 93 markie Stop execution of a file open for write
* Rodney W. Grimes Fix date on Yoval Yarom's patch
+ * 01 Jun 93 Chris Demetriou Completed markie's patch for VTEXT busy
+ if (exdata.ex_hdr.a_text != 0 && (ndp->ni_vp->v_flag & VTEXT) == 0 &&
+ ndp->ni_vp->v_writecount != 0) {
+ rv = ETXTBSY;
+ goto exec_fail;
+ }
+
+
/* ... that we recognize? */
rv = ENOEXEC;
if (exdata.ex_hdr.a_magic != ZMAGIC) {
/* ... that we recognize? */
rv = ENOEXEC;
if (exdata.ex_hdr.a_magic != ZMAGIC) {