home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!mel.dit.csiro.au!yarra!bohra.cpg.oz.au!als
- From: als@kowari.cpsg.com.au (Anthony Shipman)
- Subject: Re: The Problem with UNIX
- Message-ID: <als.722149918@marloo.kowari.cpsg.com.au>
- Sender: news@bohra.cpg.oz.au (0000-news(0000))
- Organization: Computer Power Software
- References: <96927@netnews.upenn.edu> <1992Nov11.210729.11676@cs.wisc.edu> <BARNETT.92Nov12092045@grymoire.crd.ge.com> <1992Nov13.030529.6207@bilver.uucp> <aldavi01.721645237@starbase.spd.louisville.edu>
- Date: Thu, 19 Nov 1992 05:11:58 GMT
- Lines: 47
-
- aldavi01@starbase.spd.louisville.edu (Arlie Davis) writes:
-
- >In <1992Nov13.030529.6207@bilver.uucp> bill@bilver.uucp (Bill Vermillion) writes:
-
- >> And some of the lastest bourne shells also have fixed it. In sysv.3.2
- >> from Esix if I type
-
- >> cat a b > b I get this result
-
- >> cat: input/output files 'b' identical
-
- >> So after a decade these have been solved.
-
- >This was a fix to cat, not any of the shells. And b still gets clobbered.
- >It *is* an improvement, though, and mine acts the same way.
-
- >I responded in email to Bryan So that a decent solution is a (hypothetical
- >but terribly simple) program called "buffer" would reads its stdin until EOF,
- >then opens and writes all to the filename in argv[1]. So, "cat a b > b"
- >becomes "cat a b | buffer b". He seemed to like the suggestion.
-
- TOPS10 did something like this automatically. If program A started
- reading a file and then program B opened the file for writing (not
- updating) then the OS created a new version of the file internally and
- the reader would continue to see the old version until it closed the
- file. Then the old version would be deleted and the next read would
- get the new version. Readers starting after program B would see the
- new (possibly incomplete) version.
-
- The UNIX method seems like it might have been one of the
- simplifications done when cutting down from mainframe OSes and now we
- are stuck with it.
-
- In my own thought experiments on OS design I divide the file opening
- process into a bind phase and a connect phase, analogous to opening a
- bsd socket.
-
- A hypothetical UNIX-like OS with TOPS10 version behaviour would have to
- defer the opening of stdout until in cat. eg the shell binds the file
- name to stdout and cat completes the open, after it has opened its
- input files.
-
- --
- Anthony Shipman "You've got to be taught before it's too late,
- CP Software Export Pty Ltd, Before you are six or seven or eight,
- 19 Cato St., East Hawthorn, To hate all the people your relatives hate,
- Melbourne, Australia, 3121 You've got to be carefully taught." R&H
-