linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stracing pwd
@ 2004-06-19 15:29 David Eduardo Gómez Noguera
  2004-06-19 16:13 ` Christoph Bussenius
  0 siblings, 1 reply; 2+ messages in thread
From: David Eduardo Gómez Noguera @ 2004-06-19 15:29 UTC (permalink / raw)
  To: Linux C Programming

Hellow. This just striked me.
I wondered how pwd works, I entered a linked directory, and pwd gives me
the link.
when I tried pwd -h (wrong argument) I saw there are two possible
arguments
I have 
/usr/src/linux-2.6.7
/usr/src/linux -> /usr/src/linux-2.6.7

under /usr/src/linux, 
pwd prints /usr/src/linux
pwd -L too
pwd -P prints /usr/src/linux-2.6.7
but an strace always shows the same
write(1, "/usr/src/linux-2.6.7\n", 21/usr/src/linux-2.6.7
)  = 21
and it prints /usr/src/linux-2.6.7 to stdout no matter the parameter
given to pwd.

Anyone knows why that could happen? 
( I haven't seen to the pwd code yet though)


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

end of thread, other threads:[~2004-06-19 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-19 15:29 stracing pwd David Eduardo Gómez Noguera
2004-06-19 16:13 ` Christoph Bussenius

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).