home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!rutgers!uwvax!brownie.cs.wisc.edu!so
- From: so@brownie.cs.wisc.edu (Bryan S. So)
- Newsgroups: comp.unix.wizards
- Subject: Re: The Problem with UNIX
- Message-ID: <1992Nov18.020402.23061@cs.wisc.edu>
- Date: 18 Nov 92 02:04:02 GMT
- References: <BARNETT.92Nov12092045@grymoire.crd.ge.com> <1992Nov12.231845.14014@cs.wisc.edu> <Bxr6wq.7CM@mudos.ann-arbor.mi.us>
- Sender: news@cs.wisc.edu (The News)
- Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
- Lines: 23
-
- In response to my suggestion that the shell should help the user
- buffer "b" when it sees the command "cat a b > b",
- mju@mudos.ann-arbor.mi.us (Marc Unangst) writes:
-
- >There are also problems with buffering the input. What if the "b" is
- >a FIFO or a device, not a regular file? In that case, "cat b > b" is
- >perfectly valid and not at all abnormal. What if "b" is a Unix-domain
- >socket, and the program at the other end writes something and then
- >waits for a response before closing the file? Your program will never
- >run, because Unix will be sitting there waiting to read the "rest" of
- >the input file before giving the program control.
-
- If "b" is a FIFO, it may make "cat b > b" syntactically or even
- semantically valid. But how would it make that psychologically
- valid?
-
- I suppose "cat a > a" or some variance of it is documented
- somewhere as "pitfalls" and users warned. So, whoever thought
- up a FIFO "b", such that the proper usage is "cat b > b", is
- just absurd. Can you give a practical application for such use?
-
-
- Bryan
-