All of lore.kernel.org
 help / color / mirror / Atom feed
* st_size of a symlink
@ 2012-07-23 15:55 ` Richard Weinberger
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Weinberger @ 2012-07-23 15:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel, linux-man

Hi!

lstat(2) on /proc/$pid/exe gives me a stat object where st_size is 0.

Or:
rw@mantary:~> ls -l /proc/$$/exe
lrwxrwxrwx 1 rw users 0 23. Jul 17:02 /proc/16902/exe -> /bin/bash

The lstat(2) manpage says:
"The st_size field gives the size of the file (if it is a regular file 
or a symbolic link) in bytes.  The size of a symbolic link is the length 
of the pathname it contains, without a terminating null byte."

This property is also used in the example in the readlink(2) manpage.

Is this a procfs issue or is the manpage wrong?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-07-24 10:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-23 15:55 st_size of a symlink Richard Weinberger
2012-07-23 15:55 ` Richard Weinberger
2012-07-23 18:09 ` Jesper Juhl
2012-07-23 18:09   ` Jesper Juhl
2012-07-23 20:22   ` Al Viro
2012-07-23 20:47     ` Jesper Juhl
2012-07-23 20:47       ` Jesper Juhl
2012-07-23 22:07       ` Richard Weinberger
2012-07-23 23:13         ` Guillem Jover
2012-07-24 10:16           ` Richard Weinberger
2012-07-24 10:16             ` Richard Weinberger
2012-07-23 21:53   ` Sam Varshavchik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.