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

Re: os.wait in svntest.main.copy_repos?

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-10-18 00:28:27 CEST

Vlad Georgescu wrote:
> Blair Zajac wrote:
>> David Glasser wrote:
>>> Do we need os.wait()s on the two svnadmin children in
>>> svntest.main.copy_repos, like we do in spawn_command? (Would we just
>>> call it twice? Or is there some way to get a pid from the popen3 call
>>> to wait on that?)
>> I think we should wait on it.
>>
>> However, there is no portable way to get the pid from popen3.
>>
>> On Unix, we get the os.popen3() ends up using the popen2.Popen3 class which has
>> a wait() method, but on Windows, popen2.Popen3 is deleted from the module, so
>> you can't ask it for it to wait.
>
> But we could detect the presence of popen2.Popen3 beforehand, or use a
> try..except block.

Yes, but the point was with the current os.popen3() usage, we can't get the pid
on Windows.

I would rather see os.waitpid() then os.wait() in our test code, just seems
cleaner that we won't accidentally pick up the wrong child pid if we just use
os.wait().

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 18 00:28:52 2007

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