[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CreateProcess() calls should quote the executable they are trying to start.

From: Jurko Gospodnetić <jurko.gospodnetic_at_pke.hr>
Date: Sat, 23 Jun 2012 22:56:50 +0200

Hi.

> Note: CreateProcess only does this guessing if you leave the first
> parameter as NULL. If you specify the path to the exe as the first
> parameter and the command line as the second one, then the first path
> must not (yes, must not - if you do the function call will fail) be
> enquoted even if it contains spaces. Only if the exe path is passed as
> part of the second parameter to CreateProcess, then you have to enquote
> the paths.

   Yeah, then it opens the correct process but it also passes it the
'wrong' argv command line arguments... :-) i.e. without the quotes
around the first listed command line parameter (if it contains spaces),
  argv[0] will contain the listed value only up to that initial space
and the rest of that 'executable path/name' will get split up over the
remaining array elements...

   Best regards,
     Jurko Gospodnetić

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2972810

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-06-23 23:03:33 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.