Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: bugs@shire.cs.psu.edu Newsgroups: comp.sys.sun Subject: Bad interaction between mmap and busy text files. Message-ID: <1095@brazos.Rice.edu> Date: 20 Aug 89 02:17:53 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 23 Keywords: SunOS Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 107, message 2 of 16 Serial Number: 922E0914 Machine Type: Sun 4/280 O/S Version: SunOS 4.0.3 Organization: Computer Science Department, The Pennsylvania State University 333 Whitmore Laboratory, University Park, PA 16802 Phone Number: +1 814 865 9723 Description: In pure 4.3BSD when an executable is being executed (and paged out of) the kernel refuses to allow it to be overwritten, returning instead the error ETXTBSY ("text file busy"). In SunOS, programs like "cp" use mmap, which succedes in overwriting the busy text file, usually aborting the executing instance of the first program. My intuition is that mmap should return ETXTBSY in this case instead. Repeat-By: Run a program in the background, and then copy something else on top of it with "cp". I only tried this with local disks. Who knows what NFS will do? -- Scott Schwartz