linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Eduardo Gómez Noguera" <davidgn@servidor.unam.mx>
To: Linux C Programming <linux-c-programming@vger.kernel.org>
Subject: stracing pwd
Date: Sat, 19 Jun 2004 10:29:40 -0500	[thread overview]
Message-ID: <1087658980.8158.13.camel@mokona> (raw)

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)


             reply	other threads:[~2004-06-19 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19 15:29 David Eduardo Gómez Noguera [this message]
2004-06-19 16:13 ` stracing pwd Christoph Bussenius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1087658980.8158.13.camel@mokona \
    --to=davidgn@servidor.unam.mx \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).