Fix for spawning windows processes

Fridrich Strba fridrich.strba at bluewin.ch
Wed Apr 28 01:53:42 PDT 2010


I did it intentionally, but left it there because I wanted it to raise
the question. If you have only teh argv[0] in your argv, why to leave
the space after the name there? The windows documentation is saying
"The system adds a terminating null character to the command-line string
to separate the file name from the arguments. This divides the original
string into two strings for internal processing."
So, was wondering whether one if cannot be saved :)

Cheers

Fridrich

P.S.: If there is a good reason to do the previous thing, I am not
having any religious opinion about that. Just was wondering :)

On Wed, 2010-04-28 at 10:44 +0200, Ralf Habacker wrote: 
> Fridrich Strba schrieb:
> > Hello,
> >
> > This patch is fixing a bug in dbus/dbus-spawn-win.c
> > Maybe the two (build_commandline and build_env_string) could share some
> > code.
> >
> >   
> is the following fix  intended ?
> 
> @@ -492,20 +492,46 @@ build_commandline (char **argv)
>        p += strlen (argv[i]);
>        *(p++) = ' ';
>      }
> -  if (i)
> +//  if (i)
>      p--;
>    *p = '\0';
>  
>    return buf;
>  }
> 
> regards 
> Ralf 
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
> 





More information about the dbus mailing list