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