Index: kern_exec.c =================================================================== RCS file: /private/FreeBSD/src/sys/kern/kern_exec.c,v retrieving revision 1.254 diff -u -p -r1.254 kern_exec.c --- kern_exec.c 6 Oct 2004 00:40:41 -0000 1.254 +++ kern_exec.c 30 Oct 2004 20:48:08 -0000 @@ -382,8 +382,11 @@ interpret: imgp->vp->v_vflag |= VV_TEXT; error = exec_map_first_page(imgp); - if (error) + if (error) { + if (textset == 0) + imgp->vp->v_vflag &= ~VV_TEXT; goto exec_fail_dealloc; + } /* * If the current process has a special image activator it @@ -408,11 +411,10 @@ interpret: } if (error) { - if (error == -1) { - if (textset == 0) - imgp->vp->v_vflag &= ~VV_TEXT; + if (error == -1) error = ENOEXEC; - } + if (textset == 0) + imgp->vp->v_vflag &= ~VV_TEXT; goto exec_fail_dealloc; }