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



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'.

Do you have commit access?  Otherwise I'll commit it for you as is (wth
the '3' fix above).

 Michael






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