Re: [GNOME-my]Test/improve em-junk-filter patch for evo 1.5.1



I think that is not problem with Evo 1.5.1. all shell does a parsing
before executing the command, you need quotation to avoid the parsing by
shell.

shell has the following syntax:

sh -c string

if you intend to run string as  a string command with argument and
options. then you got to put it in quote.. any arguments after the
string, they are assigned to positional parameter, starting with $0.

that mean

/bin/sh -c sa-learn --local --norebuild

will make --local and --norebuild argument fall as positional parameter
to /bin/sh (NOT sa-learn).
if you intend to pass --local and --norebuild argument to sa-learn. you
got to put it in the quoting.

Correct me if i am wrong about it.

regards,
HOH

On Fri, 2004-01-09 at 17:27, Khairil Yusof wrote:
> both bin sh and bash have a problem with Evo 1.5.1's command line
> argument for calling spamassassin.
> 
> /bin/sh -c sa-learn --local --norebuild (and similar)
> 
> These will fail silently, because sh get's confused by --, so you need
> to quote the command string

> /bin/sh -c 'sa-learn --local --norebuild'
> 
> Then it will work properly. I did a quick hack to fix this, it compiles
> ok, but not tested yet. I'm not a C programmer, but I see that simply
> adding quotes is rather simplistic fix. ;)
> 
> I'm going to submit the patch later, for anybody testing 1.5.1, please
> try compiling it and testing this patch.
> 
> Thanks.
> 
> 
> _______________________________________________
> gnome-my-list mailing list
> gnome-my-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-my-list
> 




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