[MPlayer-dev-eng] [PATCH] fix for unconditional use of PATH_MAX
Paul Jarc
prj at po.cwru.edu
Thu May 1 17:27:01 CEST 2003
D Richard Felker III <dalias at aerifal.cx> wrote:
> On Thu, May 01, 2003 at 02:35:01PM +0200, Robert Millan wrote:
>> if you hardcode PATH_MAX, you'll recieve bug reports from users telling
>> that mplayer fails or behaves unexpectedly.
>
> No, no one uses such long paths, because on ALL unices but Hurd,
> they're forbidden!
Only sort of. I just created a path 5055 bytes long on GNU/Linux.
Creating and entering the directory works; getcwd() fails;
reimplementing getcwd() by manually traversing the directory tree and
comparing stat data works; passing the whole path to stat() or chdir()
fails. Very long paths can be created and used one component at a
time, but not all at once.
Given this, I'd say that in such a situation, MPlayer is well within
its rights if it doesn't know what directory it's in. But it should
still try to work as well as possible without that information. This
would be similar to other programs' behavior here: I can descend into
a very long directory, though it may take multiple cd commands to do
it. Once I'm there, I can't use pwd, but I can use ls, etc.
paul
More information about the MPlayer-dev-eng
mailing list