linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* st_size of a symlink
@ 2012-07-23 15:55 Richard Weinberger
       [not found] ` <500D73FF.1070504-/L3Ra7n9ekc@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2012-07-23 15:55 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	linux-man-u79uwXL29TY76Z2rM5mHXA

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
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 7+ 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
     [not found] ` <500D73FF.1070504-/L3Ra7n9ekc@public.gmane.org>
2012-07-23 18:09   ` Jesper Juhl
2012-07-23 20:22     ` Al Viro
     [not found]       ` <20120723202224.GH31729-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2012-07-23 20:47         ` Jesper Juhl
2012-07-23 22:07           ` Richard Weinberger
2012-07-23 23:13             ` Guillem Jover
     [not found]               ` <20120723231333.GA1299-v62vTE6/wQGgM1MOaoewpti2O/JbrIOy@public.gmane.org>
2012-07-24 10:16                 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).