Re: [9fans] several things - Plan9
This is a discussion on Re: [9fans] several things - Plan9 ; > 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) ...
-
Re: [9fans] several things
> 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.
-
Re: [9fans] several things
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.
-
Re: [9fans] several things
On Tue, Oct 14, 2008 at 02:15:15PM +0100, Charles Forsyth wrote:
> 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,
err - I seem to recall reading some linux pty/tty source that implied a larger limit in
canonical mode - 4k/8k? But that assumes the shells in question _use_ cannonical mode.
-
Re: [9fans] several things
>But that assumes the shells in question _use_ cannonical mode.
most of them use readline, so that might explain it.