Re: [evolution-patches] Patch for 52378: all new mail marked as spam



Ops, I saw this thread just after committing Frank's patch with keeping
argc 3. So it's in CVS already. Frank, thanks for pointing that out.

On Mon, 2004-01-05 at 10:13, Not Zed wrote:
> On Sun, 2004-01-04 at 23:22 -0500, Frank Solensky wrote:
> > On Sun, 2004-01-04 at 23:00, Frank Solensky wrote:
> > > On Sun, 2004-01-04 at 22:18, Not Zed wrote:
> > > > Otherwise i guess the patch is ok.  To be honest, pipe_to_sa seems a
> > > > pretty odd api, it is only ever passed 1 thing that changes, and
> > > > passing in "/bin/sh" "-c" every time, seems redundant, maybe the whole
> > > > argc/argv thing can be removed, and just pass in the command to run as
> > > > a simple string.
> > > 
> > > The "/bin/sh","-c" elements, I agree, don't seem to be needed but I'm
> > > wondering how this is working to begin with.  I wouldn't expect that
> > > execvp() would be splitting the string into another argv array -- it
> > > looks more like the child's argv[0] has spaces embedded.  Well, if it's
> > > working, it's working..
> > 
> > Now that I think about it a bit more, that's probably why the "/bin/sh",
> > "-c" elements are there to begin with -- so that sac_args[2] will get
> > split at the spaces.  Otherwise the array needs to have a variable
> > length.
> 
> Well the /bin/sh -c is required to be passed to exec, *but* there's not
> really a requirement to pass it to pipe_to_sa every time, it could just
> have one copy of the array and set argv[2] to the string passed in.
> 
> Either that, or remove /bin/sh -c and pass the args as separate
> elements, which was probably the original intention.
> 
> Anyway it was just a comment on style, since 'it works'.

I am aware of this. I want to change that when using daemon preferences
and gconf "secret" keys for custom parameters.

I am also thinking about removing /bin/sh -c (at least for
spamc/spamassassin calls), because with it I am unable to eliminate the
false positives in case someone removes spamc under out hands. (the
execvp will succeed with non-zero error code)

Cheers
Radek





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