Title: jython.bat subprocess exit code always 0
Type: Severity: normal
Components: Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: fwierzbicki, otmarhumbel, pjenvey, zyasoft
Priority: high Keywords: patch

Created on 2009-05-21.05:44:13 by pjenvey, last changed 2009-05-23.20:02:14 by pjenvey.

File name Uploaded Description Edit Remove
jython-bat-code.diff pjenvey, 2009-05-21.05:44:11
msg4703 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-21.05:43:59
When running jython.bat via subprocess (e.g. test_subprocess running 
sys.executable), the return code is always 0, even though the .bat does 
an exit /b errorcode. Oddly enough that error code seems to register 
when testing on the command line

According to
doing cmd /c exit /b errorcode instead "enforces the process exit code". 
I have no idea what this means but it helps test_subprocess

Oti could you review this change? Does it look evil, can we always rely 
on cmd.exe?
msg4709 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-22.22:30:08
I suppose we could make it %COMSPEC% /c
msg4710 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-05-23.06:16:30
In all 3 variants, i get exactly one failing test in
FAIL: test_communicate_pipe_buf (__main__.ProcessTestCase)

I'm in favour of %COMSPEC% /c, the installer autotests pass with this.
msg4711 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-23.06:22:05
That one's a separate issue. I didn't totally diagnose it but I found 
that the child process of that test doesn't get the full -c command line 
arg passed to it.

subprocess seemed to be doing its job there so I have a suspicion that 
the .bat is cutting it off somehow. Though I could be wrong
msg4712 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-23.20:02:14
.bat change applied in r6370
Date User Action Args
2009-05-23 20:02:14pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg4712
2009-05-23 06:22:06pjenveysetmessages: + msg4711
2009-05-23 06:16:40otmarhumbelsetmessages: + msg4710
2009-05-22 22:30:08pjenveysetmessages: + msg4709
2009-05-22 16:13:08zyasoftsetnosy: + fwierzbicki, zyasoft
2009-05-21 05:44:14pjenveycreate