[qmtest] [PATCH] Use processes instead of threads

Mark Mitchell mark at codesourcery.com
Thu Apr 29 04:04:10 UTC 2004


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.

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.)

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".

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com




More information about the qmtest mailing list