bug-global
[Top][All Lists]
Advanced

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

Re: Magic number (Re: cost of popen())


From: Hideki IWAMOTO
Subject: Re: Magic number (Re: cost of popen())
Date: Sat, 23 Jul 2005 15:27:16 +0900

On Sat, 23 Jul 2005 12:12:26 +0900, Shigio YAMAGUCHI wrote...
> Reading your code, I have understood that xargs(1) is not used.
> By the way, I cannot understand the folloging code:
> 
>                 path_list_max = ARG_MAX;
>                 path_list_max -= 2048;
>                 if (path_list_max > 20 * 1024)
>                         path_list_max = 20 * 1024;
>                 path_list_max -= env_size();
>                 path_list_max -= strbuf_getlen(sb);
>                 path_list_max -= 40;                            <= (*)
>                 if (path_list_max < 0)
>                         path_list_max = 0;
> 
> What is the 40?

strlen("/bin/sh") + 1 + strlen("-c") + 1 
 + (space for the additional sort command)

----
Hideki IWAMOTO  address@hidden




reply via email to

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