/proc st_size

Ingo Molnar (mingo@pc5829.hil.siemens.co.at)
Tue, 14 May 1996 15:52:26 +0200 (MET DST)


[ i admittedly have a quite old version of "cat", so this mail might just
be plain noise ]

when i do the following:

linux:> cat /proc
cat: /proc: Invalid argument
linux:> cat /usr
cat: /usr: Is a directory

The problem seems to be with "cat", it cant handle 0 st_size directories:

for /proc --> fstat(3, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
for /usr --> fstat(3, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0

is it legal for /proc to be st_size=0 ? [isn't fstat() some Posix thing?]

-- mingo