summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-05-14 04:16:14 (GMT)
committerFred Drake <fdrake@acm.org>2003-05-14 04:16:14 (GMT)
commitc868d16e11acf4a8589a6bf1e6e720c063b3877f (patch)
treeb9fa38dd8afb6774c7777beb4a1206a062d813df /Doc/tools
parenta71319eebbc2a35ab8df2c78ced364583f3608f3 (diff)
downloadcpython-c868d16e11acf4a8589a6bf1e6e720c063b3877f.zip
cpython-c868d16e11acf4a8589a6bf1e6e720c063b3877f.tar.gz
cpython-c868d16e11acf4a8589a6bf1e6e720c063b3877f.tar.bz2
When an external application we use exits normally, exit with the same
exit code they returned. All other types of exit from child processes are normalized to a return code of 1. Closes SF bug #732143.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-xDoc/tools/mkhowto6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto
index 7163974..eed1a58 100755
--- a/Doc/tools/mkhowto
+++ b/Doc/tools/mkhowto
@@ -525,9 +525,11 @@ class Job:
self.warning(
"Session transcript and error messages are in %s."
% self.log_filename)
+ result = 1
if hasattr(os, "WIFEXITED"):
if os.WIFEXITED(rc):
- self.warning("Exited with status %s." % os.WEXITSTATUS(rc))
+ result = os.WEXITSTATUS(rc)
+ self.warning("Exited with status %s." % result)
else:
self.warning("Killed by signal %s." % os.WSTOPSIG(rc))
else:
@@ -535,7 +537,7 @@ class Job:
sys.stderr.write("The relevant lines from the transcript are:\n")
sys.stderr.write("-" * 72 + "\n")
sys.stderr.writelines(get_run_transcript(self.log_filename))
- sys.exit(rc)
+ sys.exit(result)
def message(self, msg):
msg = "+++ " + msg