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

Re: [E-devel] Entranced does not start entrance properly



On Sun, 27 Aug 2006 19:13:25 +0300 Eugen Minciu <minciue@gmail.com> babbled:

> Fixed it.
> Here's a patch that runs /bin/bash first.
> 
> If that doesn't work execl should return so the next line should run after
> that ( execl("/bin/sh", ...)
> 
> I also found the same issue when entrace starts the session. The same fix
> finally got everything working corectly.
> 
> BTW, I'm new to this patching thing ... Should I have ran cvs diff -u in
> e17/apps/entrance so both files would have been inside the same diff?

nice - but ugly. then you still have the problem if bash isn't installed.

instead of the simple and (still broken) fix... do what the comment says -
actually write code to parse a command-line - frankly for executing x you won't
need anything complex. you won't even have to evaluate environment variables.
for this usage just splitting into an argv array based on whitespace would work
just fine. adding escape handling would be easy (\ + char == explicit char).
e17 has code that even will evaluate environment variables too (e_utils.c). add
in quote (single and double) handling and you have done it all - but frankly i
think you will survive with whitepsace splitting.

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)