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.
--- Begin Message ---
> 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.

--- End Message ---

Reply via email to