[Gllug] Off Topic: C File Descriptors

Nix nix at esperi.org.uk
Tue Mar 11 21:08:37 UTC 2008


On 9 Mar 2008, Adrian McMenamin verbalised:

> On Sun, 2008-03-09 at 23:50 +0100, salsaman at xs4all.nl wrote:
>> Say what ? 512 is the maximum path length on Linux, I don't see where the
>> bugs were or how I misunderstood dynamic memory allocation (I presume you
>> mean the sprintf). The memset is needed because readlink() does not append
>> a  null byte - check the manpage.
>
> /include/linux/limits.h defines the max path length as 4096

Of course you should not use this.

#include <limits.h>, as POSIX specifies, and forget all the other grot.

-- 
`The rest is a tale of post and counter-post.' --- Ian Rawlings
                                                   describes USENET
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list