> --- pdns-3.2.orig/modules/pipebackend/coprocess.cc    2013-01-17
> 13:16:53.000000000 +0400
> +++ pdns-3.2/modules/pipebackend/coprocess.cc    2013-03-02
> 15:12:04.415022452 +0400
> @@ -9,12 +9,20 @@
>  #include <sys/wait.h>
>  #include <pdns/misc.hh>
>  #include <pdns/ahuexception.hh>
> +#include <boost/algorithm/string.hpp>
> +#include <vector>
> 
>  CoProcess::CoProcess(const string &command,int timeout, int infd,
> int outfd)
>  {
> -  const char *argv[2];
> -  argv[0]=strdup(command.c_str());
> -  argv[1]=0;
> +  vector <string> v;
> +
> +  split(v, command, is_any_of(" "));
> +
> +  const char *argv[v.size()+1];
> +
> +  for (size_t n = 0; n < v.size(); n++)
> +    argv[n]=strdup(v[n].c_str());
> +  argv[v.size()]=0;
> 
>    launch(argv,timeout,infd,outfd);
>  }
> 

Could you please open a ticket about the patch above so we could get it
included in to powerdns, it looks really useful to me. +1

Aki

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to