[MERGE] run_bzr_suprocess avoids preexec_fn

John Arbash Meinel john at arbash-meinel.com
Tue Sep 5 15:15:31 BST 2006


Alexander Belchenko wrote:
> Alexander Belchenko пишет:
>> Here is result of running selftest on win32 with fresh bzr.dev revno.1982
>>
>> Ran 3329 tests in 1727.695s
>>
>> FAILED (failures=33, errors=41)
> 

...

Attached is a bundle which does 2 things:

1) adds a function to osutils which handles all of the set/unset logic.
I've implemented this logic several times, and it seems better to just
have a helper function. (Plus, the helper function handles unicode strings)

2) Changes run_bzr_subprocess() to use a try/finally to set and clear
the environment, rather than using preexec_fn. I think preexec_fn is
really a much better an cleaner solution, but if it doesn't work on
win32, then we should avoid using it, rather than special casing the
code path based on platform.

Alexander: does this get those tests to not fail for you?

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_bzr_subprocess_no_preexec.patch
Type: text/x-patch
Size: 15820 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060905/6b337434/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060905/6b337434/attachment.pgp 


More information about the bazaar mailing list