diff options
author | Fred Drake <fdrake@acm.org> | 2001-08-10 20:17:09 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-08-10 20:17:09 (GMT) |
commit | 1cb560a65344f4e4ec58a09a9e376e9e7edfb4bd (patch) | |
tree | 0e4b1b4872f9a25e9367718c4177bd70cfbe1136 /Doc | |
parent | 9443dc31c1f0fc7a5eb352afa7e6f86f7ae2bf80 (diff) | |
download | cpython-1cb560a65344f4e4ec58a09a9e376e9e7edfb4bd.zip cpython-1cb560a65344f4e4ec58a09a9e376e9e7edfb4bd.tar.gz cpython-1cb560a65344f4e4ec58a09a9e376e9e7edfb4bd.tar.bz2 |
Do more to be compatible with Windows/CygWin. Make error messages more
informative when a child process dies with an error.
This is a variation of parts of SF patch #429611.
Diffstat (limited to 'Doc')
-rwxr-xr-x | Doc/tools/mkhowto | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Doc/tools/mkhowto b/Doc/tools/mkhowto index 0d5d687..0e211d9 100755 --- a/Doc/tools/mkhowto +++ b/Doc/tools/mkhowto @@ -180,6 +180,8 @@ class Options: elif opt == "--global-module-index": self.global_module_index = arg elif opt == "--dir": + if os.sep == "\\": + arg = re.sub("/", "\\", arg) self.builddir = arg elif opt == "--paper": self.paper = arg @@ -475,12 +477,22 @@ class Job: def run(self, command): self.message(command) - rc = os.system("(%s) </dev/null >>%s 2>&1" - % (command, self.log_filename)) + if sys.platform.startswith("win"): + rc = os.system(command) + else: + rc = os.system("(%s) </dev/null >>%s 2>&1" + % (command, self.log_filename)) if rc: self.warning( "Session transcript and error messages are in %s." % self.log_filename) + if hasattr(os, "WIFEXITED"): + if os.WIFEXITED(rc): + self.warning("Exited with status %s." % os.WEXITSTATUS(rc)) + else: + self.warning("Killed by signal %s." % os.WSTOPSIG(rc)) + else: + self.warning("Return code: %s" % rc) 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)) |