[Info-vax] Request description of UFS for VMS person
Bill Gunshannon
billg999 at cs.uofs.edu
Tue Apr 21 15:24:18 EDT 2009
In article <176uZD2KcidF-pn2-oDg7JnJOBrdZ at rikki.tavi.co.uk>,
"Bob Eager" <rde42 at spamcop.net> writes:
> On Tue, 21 Apr 2009 18:30:13 UTC, billg999 at cs.uofs.edu (Bill Gunshannon)
> wrote:
>
>> In article <gsl18u$bja$6 at naig.caltech.edu>,
>> glen herrmannsfeldt <gah at ugcs.caltech.edu> writes:
>> > Bill Gunshannon <billg999 at cs.uofs.edu> wrote:
>> > (snip on od or cat on unix directories)
>> >
>> >> Current version of dd won't do it either. Of course, you could grab the
>> >> source to cat and write your own version that ignores it being a directory.
>> >> Or just copy the stripped down version fromt he K&R C book. :-)
>> >
>> > I believe the failure is at the system call level, propagated
>> > back through errno and perror. Likely the programs don't know
>> > or care that it is a directory, but just that the open fails.
>>
>> Seems unlikely. Always could "cat" a directory in the past because,
>> after all, it, too, is just a stream of bytes. :-) For the hell of
>> it, tonite, I will take a look at the source for the current version
>> of cat. I think I will find a test for directories and a deliberate
>> fail if it is.
>
> Hmmm....my FreeBSD systems allow one to 'cat' a directory, as I would
> expect.
What version? Mine did in the past but I just tried it and it failed
on a directory. I run mostly FreeBSD here. No Solaris currently in
operation. Not even at home.
>
> I just tried on a SunOS system at work, and 'cat' fails on a directory.
> I don't have the source for that, but I wrote a test program and
> successfully opened a directory with that.
>
> So it does seem to be, at least on SunOS, something in the application
> rather than the API.
As I expected, protect the user from himself.
bill
--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
billg999 at cs.scranton.edu | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
More information about the Info-vax
mailing list