l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On PATH_MAX


From: Michal Suchanek
Subject: Re: On PATH_MAX
Date: Fri, 4 Nov 2005 21:57:35 +0100

On 11/4/05, Jonathan S. Shapiro <address@hidden> wrote:
> On Fri, 2005-11-04 at 20:49 +0100, Michal Suchanek wrote:
> > On 11/4/05, Jonathan S. Shapiro <address@hidden> wrote:
> > > On Fri, 2005-11-04 at 08:00 +0100, Marcus Brinkmann wrote:
> > >
> > > > This is completely wrong (and I made the same wrong statement before).
> > > > First, you only need to recompile the programs using PATH_MAX.
> > >
> > > Actually, not. You only need to recompile existing programs when
> > > PATH_MAX *shrinks*.
> > >
> > I wonder what happens to all those programs that use PATH_MAX to
> > allocate a static buffer and then receive a longer pathname bacause
> > the constant has been increased.
>
> They break.
>
> But you aren't thinking about the big picture. PATH_MAX growth is *very*
> rare, and it is almost always the result of a change in a single
> program. The rest of the world, in practice, can almost always wait for
> the next release cycle.
hmm, I was thinking where the pathname would get written if the buffer
is not large enough. I think relying on PATH_MAX is not a good design.
If the system does not impose such limit I think it is not a good idea
to support that practice.
You can always compile with -DPATH_MAX=4096. And face the consequences.

Thanks

Michal


--
             Support the freedom of music!
Maybe it's a weird genre  ..  but weird is *not* illegal.
Maybe next time they will send a special forces commando
to your picnic .. because they think you are weird.
 www.music-versus-guns.org  http://en.policejnistat.cz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]