Show More
@@ -188,6 +188,13 b' class ProcessHandler(object):' | |||||
188 | # We follow the subprocess pattern, returning either the exit status |
|
188 | # We follow the subprocess pattern, returning either the exit status | |
189 | # as a positive number, or the terminating signal as a negative |
|
189 | # as a positive number, or the terminating signal as a negative | |
190 | # number. sh returns 128+n for signals |
|
190 | # number. sh returns 128+n for signals | |
|
191 | if child.exitstatus is None: | |||
|
192 | # on WIFSIGNALED, pexpect sets signalstatus, leaving exitstatus=None | |||
|
193 | if child.signalstatus is None: | |||
|
194 | # this condition may never occur, | |||
|
195 | # but let's be certain we always return an integer. | |||
|
196 | return 0 | |||
|
197 | return -child.signalstatus | |||
191 | if child.exitstatus > 128: |
|
198 | if child.exitstatus > 128: | |
192 | return -(child.exitstatus - 128) |
|
199 | return -(child.exitstatus - 128) | |
193 | return child.exitstatus |
|
200 | return child.exitstatus |
General Comments 0
You need to be logged in to leave comments.
Login now