home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4365 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.8 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.unix.programmer
  4. Subject: ETXTBSY on open for write (was Re: Process & Signal Question)
  5. Message-ID: <14145@auspex-gw.auspex.com>
  6. Date: 19 Aug 92 04:13:12 GMT
  7. References: <Bt5tp0.9JI@gumby.ocs.com> <1992Aug18.145412.6352@wuecl.wustl.edu> <1992Aug18.205521.4078@ringer.cs.utsa.edu>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 26
  11. Nntp-Posting-Host: bootme.auspex.com
  12.  
  13. >If you are talking about a file which is being shared via NFS, this could
  14. >happen, because NFS does not completely implement the UNIX file deletion
  15. >semantics.
  16.  
  17. Well, that's not the *only* reason it can happen.  It can also happen if
  18. you copy stuff to a file, as well; even if the system running the
  19. program won't let you open a shared executable for writing if some
  20. process is running from it, a process on some other system - another
  21. client of the same server, or the server itself if the process running
  22. from the file is on a client - could write to the file.
  23.  
  24. In SunOS 4.x and, I think, SVR4, the system *will* let you open a shared
  25. executable for writing even if some process on the same machine is
  26. running from it.  It might be possible to implement the more
  27. "traditional" semantics, but to properly generalize it, it'd have to
  28. work on shared libraries as well, which'd probably mean that:
  29.  
  30.     1) the run-time linker would have to use some call other than
  31.        "mmap()" to map in the shared libraries, or would have to use
  32.         some special flag to "mmap()";
  33.  
  34.     2) the system would have to decide that anybody mapping
  35.        something copy-on-write wants to prevent anybody else from
  36.        opening the file for writing (you don't have to open a file
  37.        for writing to map it writable, as long as you're mapping it
  38.        copy-on-write as well).
  39.