9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <forsyth@terzarima.net>
To: 9fans@9fans.net
Subject: Re: [9fans] several things
Date: Tue, 14 Oct 2008 14:15:15 +0100	[thread overview]
Message-ID: <2efe70578a028bec7b9068c6c9be849e@terzarima.net> (raw)
In-Reply-To: <e2f969e10810140522r4e874ef1n9f63d3cced7d53bf@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

fd2path should probably complain if the buffer is too small.
i'm surprised at any actual name longer than 512 (or even 256), not so much for plan 9, but
because linux systems still seem to have that tiny TTY limit on the size of an input line,
or it did the last time i tried to use the mouse to snarf and send a command line printed by make.

[-- Attachment #2: Type: message/rfc822, Size: 2750 bytes --]

From: Yaroslav <yarikos@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>
Subject: Re: [9fans] several things
Date: Tue, 14 Oct 2008 15:22:10 +0300
Message-ID: <e2f969e10810140522r4e874ef1n9f63d3cced7d53bf@mail.gmail.com>

> But at least it means that the 'pwd' function returns a wrong answer
> _without_warning_ when the path is longer. I tried it. This is not a nice
> thing. Are these limitations listed in some document?

The pwd(1) utility has this limitation for simplicity. The getwd(2)
function and fd2path(2) syscall can work on arbitrary-sized buffers.
So, to overcome the limit, you have few choices:
 1) modify the pwd.c to allocate more memory; or
 2) bind not-so-long parts of your path to /n/something to construct a
namespace with shorter absolute paths; or
 3) blame the tree holders.

--
Best regards,
    Yaroslav.

  reply	other threads:[~2008-10-14 13:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 21:35 Rudolf Sykora
2008-10-13 22:35 ` erik quanstrom
2008-10-14  8:10   ` Rudolf Sykora
2008-10-14  9:30     ` Steve Simon
2008-10-14 12:22     ` Yaroslav
2008-10-14 13:15       ` Charles Forsyth [this message]
2008-10-14 21:44         ` Derek Fawcus
2008-10-14 22:28           ` Charles Forsyth
2008-10-15  9:42   ` Roman V. Shaposhnik
2008-10-15 12:17     ` erik quanstrom
2008-10-18  7:26       ` Roman V. Shaposhnik
2008-10-20 14:09         ` Yaroslav
2008-10-20 17:21           ` Roman V. Shaposhnik
2008-10-13 22:51 ` Pietro Gagliardi
2008-10-14  3:07 erik quanstrom
2008-10-14 13:03 erik quanstrom
2008-10-14 14:07 ` Kernel Panic

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=2efe70578a028bec7b9068c6c9be849e@terzarima.net \
    --to=forsyth@terzarima.net \
    --cc=9fans@9fans.net \
    /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).