[qmtest] [PATCH] Use processes instead of threads
Nathaniel Smith
njs at pobox.com
Thu Apr 29 06:25:22 UTC 2004
On Wed, Apr 28, 2004 at 09:04:10PM -0700, Mark Mitchell wrote:
> Zack Weinberg wrote:
>
> >you should add to the documentation an explanation of why this is the
> >default concurrency mode, and under what conditions it is safe to use
> >the lower-overhead mode.
> >
> I actually think that Nathaniel's patch is not a great solution.
>
> The differences in behavior between the GUI and the command-line are
> going to be confusing to someone at just the wrong moment. Now that we
> know about this problem, we owe it to our users to solve it.
Agreed. It's only positive feature is that it's better than the
current behaviour, where it's confusing to people at all moments :-)
> I think the best solution would just be to call sigprocmask after fork
> in executable.py, if the caller supplies a mask. The built-in test
> classes should provide a mask with no signals blocked. (We actually
> want this for ProcessTarget as well -- if QMTest were ever to block
> signals itself, or be exec'd from a process that blocked signals, we'd
> get weird behavior in the children even with ProcessTarget.)
Arguably that would be okay, on the theory that if our caller blocked
our signals, its because they wanted our signals to be blocked. That
is not a use case I'm particularly worried about, though...
> Since Python does not have "sigprocmask" in its library, this does
> require adding a non-pure module to QMTest. That module is already out
> there; someone has written a "sigmask" module. We can just incorporate
> it -- disabling it on Windows, of course. For now, we can assume that
> all UNIX systems have "sigprocmask".
Where? The closest I can find is some years old abandonware GPLed
module, that I'm not sure I trust and that I'm not entirely sure we're
license compatible with (since we disagree with the FSF about the use
of proprietary plugins -- i.e., test classes -- in a GPLed program).
I guess it wouldn't be hard to whip up such a module anyway, though.
Is NSIG available cross-platformly? If so then it's easy to write
set_sigmask()/get_sigmask(); if not then clear_sigmask() is still easy
to write.
-- Nathaniel
--
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould
More information about the qmtest
mailing list