Esa Ilari Vuokko wrote:
Hi,
This patch needs to be tested in cygwin environment, with cygwin python!
Mon Aug 21 22:21:18 FLE Standard Time 2006 Esa Ilari Vuokko <[EMAIL PROTECTED]>
* Enable timeout in Windows and don't require cygwin python
This patch fixes and enables using timeout in Windows.
It also changes the way test-commands are invoked in Windows. I tested
this with mingw/msys and *native* python. It needs to be tested with
cygwin setup!
It also fixes numerous fails that are caused by invalid error
returns in Windows, the <<8 for exit code.
Best regards,
--Esa
------------------------------------------------------------------------
New patches:
[Enable timeout in Windows and don't require cygwin python
Esa Ilari Vuokko <[EMAIL PROTECTED]>**20060821192118] {
hunk ./driver/testlib.py 1003
- return os.system( cmd )
+ r = os.spawnl(os.P_WAIT, config.timeout_prog,
+ config.timeout_prog,`config.timeout`,'"%s"'%cmd )
+ return r << 8
hunk ./timeout/timeout.hs 84
- forkIO (do p <- runCommand cmd
+ forkIO (do p <- runCommand $ "sh -c \"" ++ cmd ++ "\""
This looks strange to me: runCommand already runs the command using the shell,
so you appear to have added another shell layer. Why is this necessary? If
it's needed for some reason, perhaps add a comment to explain?
Cheers,
Simon