home *** CD-ROM | disk | FTP | other *** search
- From: guy@Sun.COM (Guy Harris)
-
- > ...it would mean that things like
- > fd = open(some-random-filename,something);
- > do-something-bizarre-with-fd;
- > close(fd);
- > will do a "close(-1)" if the open happened to fail for some reason or other,
- > which is harmless at the moment (just returns -1, errno=EBADF), but would be
- > a bit tragic with this new semantics!
- > Yes, I know this isn't a problem if everyone always checks the return-value
- > from open(), creat(), etc..., but lots of programs aren't that pessimistic!
-
- Programs that are not that pessimistic are broken. I see no reason
- to reject this proposal out of hand merely because it would expose
- bugs in programs such as these; indeed, the fact that it exposes
- these bugs might be an excellent reason to do it - it is very
- aggravating to deal with programs that exhibit this sort of unwarranted
- optimism, as they do not give very good error indications when this
- optimism is unwarranted (if they bother giving one at all!).
-
-
- Volume-Number: Volume 11, Number 75
-
-