home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!brunel!cs89rdb
- From: cs89rdb@brunel.ac.uk (Roger D Binns)
- Newsgroups: comp.os.linux
- Subject: Re: Possible 0.98.3 bug (in fs mounting)
- Message-ID: <BxLrI8.D5I@brunel.ac.uk>
- Date: 12 Nov 92 12:18:06 GMT
- References: <1992Nov8.195649.16470@klaava.Helsinki.FI>
- Organization: Brunel University, Uxbridge, UK
- Lines: 21
- X-Newsreader: TIN [version 1.1 PL6]
-
- I have also found a bug in the open call. If you do an open, but do not give
- read or write flags, subsequent reads or writes fail with EBADF. Example code
- is:
-
- int fd;
-
- fd=open("/tmp/testing", O_CREAT|O_TRUNC, 0666);
- write(fd, " ", 2);
- perror("this is it");
-
- According to SVID, O_TRUNC implies O_WRITE. Indeed, it still implies write
- even if the file is created, and the mode is 0000.
-
- Roger
- --
- +=============================================================================+
- | cs89rdb@brunel.ac.uk Roger Binns Brunel University - UK |
- |:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
- | Do your bit to destroy the American economy by overwhelming their legal |
- | system - buy an Intel chip to run your Lotus software TODAY. |
- +=============================================================================+
-