[GHC] #10345: Testsuite timeout_multiplier setting does not work as expected
GHC
ghc-devs at haskell.org
Wed Feb 3 17:04:06 UTC 2016
#10345: Testsuite timeout_multiplier setting does not work as expected
-------------------------------------+-------------------------------------
Reporter: jstolarek | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Test Suite | Version: 7.11
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D982
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by thomie):
Replying to [comment:1 thomie]:
> The issue only I seem to be having is that running `python
testsuite/timeout/timeout.py 10 'echo ok' ` doesn't return immediately,
but only after 10 seconds.
I finally figured this one out. I had `stty tostop` set in `~/.bashrc`.
When `stty tostop` is set, a background process that tries to write to the
terminal receives a SIGTTOU signal, which suspends it.
In timeout.py, the first thing the child process does is call
`os.setpgrp()`. This creates a new process group, with the child process
itself as process group leader. Because only one process group per session
can be the foreground process group, it will be a background process
group.
I'm not sure yet //why// timeout.py turns the child process that it
creates into a background process. One implication is that `CTRL-C`
doesn't kill it.
References:
* https://www.win.tue.nl/~aeb/linux/lk/lk-10.html
* http://www.linusakesson.net/programming/tty/index.php
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10345#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list