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

Re: [TSVN] Tortoiseproc apparently must have a shell

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-06-23 18:33:52 CEST

Norbert Unterberg wrote:

> There is something that might have to do with it:
>
> When you execute an application, at least the the WinExec system call
> returns as soon as the started process has called the GetMessage
> function (or after some timeout). That means that WinExec returns for
> windows MFC applications usually after their InitInstance is complete,
> or if they call a message box (the message box code calls GetMessage
> internally). So message boxes can can make a difference here. And
> calling CMD /c some_app makes a difference here because it does not
> return before some_app has finished. You can see the difference:
> run CMD
> in CMD, compare "notepad" to "cmd /c notepad". See the difference?

Yes, that might be the reason here.

> However, CreateProcess is used here that does not depend on that, but
> maybe some of the code after the CreateProcess tries to mimic WinExec
> here? Maybe it even kills the process when it does not "respond" in
> some time? Note that TortoiseProc may do some lengthy repository
> operation before calling GetMessage for the first time?

Yes, but that's always necessary.

> Steve, how about calling a single GetMessage in the InitInstance()
> method, just for test?

Not a good idea. If you call GetMessage, then you must process the
message you get there. And we can't process all the messages which might
be in the queue before we have initialized everything we need.

> One other difference:
> CreateProcess has a flag to indicate if the environment should be in
> unicode or not. TSVN 1.2 is a unicode build, but the
> CREATE_UNICODE_ENVIRONMENT does not seem to be set. Can this be a
> problem here?

Unlikely. The shell extension doesn't set that flag either.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jun 23 18:50:49 2005

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.