home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3932 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  3.1 KB

  1. Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!news
  2. From: urlichs@smurf.sub.org (Matthias Urlichs)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: named pipes (was: Finger and .plan, .project)
  5. Date: 27 Jul 1992 12:28:30 +0200
  6. Organization: University of Karlsruhe, FRG
  7. Lines: 58
  8. Message-ID: <150j4eINNilf@smurf.smurf.sub.org>
  9. References: <19076@fritz.filenet.com> <14u80cINNbd8@grasp1.univ-lyon1.fr> <1992Jul26.165838.1278@news.eng.convex.com>
  10. NNTP-Posting-Host: 127.0.0.1
  11. Keywords: named pipes, fopen, popen, .plan, .profile, .signature
  12.  
  13. In comp.unix.internals, article <1992Jul26.165838.1278@news.eng.convex.com>,
  14.   tchrist@pixel.convex.COM (Tom Christiansen) writes:
  15. <     $ diff (tail file1) (tail file2)
  16. < which sometimes is implemented using temporary named pipes, or sometimes
  17. < with the /dev/fd stuff if you're lucky enough to have it.  I'm not 
  18. < sure why on systems without either you couldn't use a regular temp file.
  19. End of file. You'd have to wait for both tail processes to finish before you
  20. could start the diff. That doesn't really make sense because you want to wait
  21. for the file to be closed, not for the processes to end. These two conditions
  22. are somewhat unrelated.
  23.  
  24. You could probably create the temp files, mandatory-lock them, and then 
  25. exec the tail processes. If the diff waits for the lock correctly (that's why
  26. the lock has to be mandatory) you have a workable lockout.
  27.  
  28. Are there any systems with mandatory locking but without either named
  29. pipes, unix-domain stream sockets, ptys, or ... well, anything else that
  30. could do the job?
  31.  
  32. < Named pipes also used when someone wants a program to intercept I/O calls,
  33. < allowing a file to produce more interesting output.  This is the case when
  34. < people replace their dot-plan with a pipe, for instance.
  35.  
  36. Or their .signature. ;-)
  37.  
  38. < Furthermore, I believe that under both Plan9 and SunOS that you can have a 
  39. < filesystem type that does the right thing, so if people did this:
  40. <     ln -s ~/.plan /plans/$USER
  41. < Then have /plans be a special filesystem type that triggers invocation
  42. < of the right code.
  43. I don't know about SunOS, but Plan 9 can do it.
  44. You don't even need the symlink, just mount your personal signature server
  45. over your home directory.
  46.  
  47. < What programs would break drastically if we changed the library fopen()
  48. < call to either accept "rx"/"wx" to indicate a popen(), or else for the
  49. < sake of transparency, to have it stat() the file and check for the execute
  50. < bit?  (Should we to do it for open() as well?  Probably.)  Certainly editors
  51. < would prefer the former solution, but most general purpose programs the
  52. < latter one.
  53. Ugh. I'd include almost every development tool. Or take cp for instance --
  54. do you still want to be able to copy executable files?  ;-)
  55.  
  56. -- 
  57. If you happen to be one of the fretful minority who can do creative work,
  58. never force an idea; you'll abort it if you do. Be patient and you'll give
  59. birth to it when the time is ripe. Learn to wait.
  60.                 -- Lazarus Long
  61. -- 
  62. Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
  63. Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
  64.