Complexity of reallocating storage (was users command crap)
Chris Torek
torek at h2opolo.ee.lbl.gov
Thu Feb 7 21:01:57 AEST 1991
In article <1991Feb07.013637.6542 at convex.com> tchrist at convex.COM
(Tom Christiansen) writes:
[sample error message]
> my_prog: cannot creat /foo/bar: permission denied
>
>The my_prog is especially important in programs in pipelines. I once
>grepped through all the system source (ok, it was BSD, but that doesn't
>let the rest of the world off the hook) for things that said effectively:
>
> fprintf(stderr, "cannot open: %s\n", filename);
>
>and was horrified and angered. They all deserve fixing.
>... Yes, I've attempted to move the thread again. I don't think it
>belongs in BSD bugs anymore, although maybe Bostic et alii will
>notice the BSD reference above and amend any remaining deficiencies.
>My check was many, many releases ago -- I don't how bad recent
>Berkeley code is at this.
Many of these have been fixed. We% tend to agree that programs should
include their name, the operation and parameters, and the error string;
many more programs now say
(void) fprintf(stderr,
"foo: cannot open %s for reading: %s\n", file, strerror(errno));
instead of
perror(file);
(I find it rather appalling to see how much longer the `good' version is
in a side by side, er, bottom by top, comparison like this. Still, it
seems worth it.)
-----
% `We' == myself and Keith Bostic, at least (though we differ on some
details :-) ). I have only indirect influence on new BSD releases,
but that is better than none....
--
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 xxx xxxx)
Berkeley, CA Domain: torek at ee.lbl.gov
More information about the Comp.unix.programmer
mailing list