On 9/17/07, Trent Mick <[EMAIL PROTECTED]> wrote:

> How do you tell Windows to do that?

Via the SetErrorMode call.

Since the Windows buildbot already uses the win32 extensions, I just
used the existing win32api wrapper (although through ctypes is very
easy too).  In my case I just surrounded the reactor.spawnProcess call
in buildbot/slave/commands.py with:

old_err_mode = win32api.SetErrorMode(7)
and
win32api.SetErrorMode(old_err_mode)

I suppose I should really tweak that to 0x8007 rather than just 7 to
include missing file dialogs (like when a removeable device is not
available).

Since the error mode is inherited by child processes (unless
explicitly overridden in the CreateProcess call), this effectively
covers the primary child process and any others it may spawn during
execution, so it works even though buildbot uses an intermediate
command interpreter to execute whatever command is requested.

We had a bit of discussion about this recently on the py3k devel list,
in regards to failures in the python buildbot tests, in regards to
more local changes within Python itself.

-- David
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to