Re: [dev] dmenu_path rewrite in C

From: Elmo Todurov <todurov_AT_gmail.com>
Date: Wed, 19 May 2010 16:59:42 +0300

On 05/19/2010 04:47 PM, Troels Henriksen wrote:
> Elmo Todurov<todurov_AT_gmail.com> writes:
>
>> * less mallocs, less copying strings around (no noticeable change in
>
> I really think this MAX_PATH thing is a bad idea. You can argue that a
> system with paths that deep is broken, but I think a suckless program
> should be able to work in sucky environments as well.

Do you realize how deep is 4096 characters? Have you tried to make a
path that long? Have you ever seen the following error message? If cd
fails, why expect dmenu_path would work?

cd: error retrieving current directory: getcwd: cannot access parent
directories: File name too long

For your testing pleasure, here's a skript that creates a deep path.
for i in `seq 1 100`;do mkdir thisisalonglongstringthisisalonglongst$i;
cd thisisalonglongstringthisisalonglongst$i;done

Elmo
Received on Wed May 19 2010 - 13:59:42 UTC

This archive was generated by hypermail 2.2.0 : Wed May 19 2010 - 14:12:02 UTC