summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-05-20 16:15:58 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-05-20 16:15:58 (GMT)
commitdbaf04ead68ae30f7f540837b5c674b2df66b0ed (patch)
treec3fca53cc3136fd92e97eaede7b8b1267b6d3b6c /Doc
parent6bab183d4e6e3b97438a017d3bc857fa248122b1 (diff)
downloadcpython-dbaf04ead68ae30f7f540837b5c674b2df66b0ed.zip
cpython-dbaf04ead68ae30f7f540837b5c674b2df66b0ed.tar.gz
cpython-dbaf04ead68ae30f7f540837b5c674b2df66b0ed.tar.bz2
Straighten out the docs for os.system(); the Unix and Windows behaviors
really can't be smushed together. Bugfix candidate.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libos.tex18
1 files changed, 13 insertions, 5 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index 074d332..229342f 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -1514,11 +1514,19 @@ Execute the command (a string) in a subshell. This is implemented by
calling the Standard C function \cfunction{system()}, and has the
same limitations. Changes to \code{posix.environ}, \code{sys.stdin},
etc.\ are not reflected in the environment of the executed command.
-The return value is the exit status of the process encoded in the
-format specified for \function{wait()}, except on Windows 95 and 98,
-where it is always \code{0}. Note that \POSIX{} does not specify the
-meaning of the return value of the C \cfunction{system()} function,
-so the return value of the Python function is system-dependent.
+
+On \UNIX the return value is the exit status of the process encoded in the
+format specified for \function{wait()}. Note that \POSIX{} does not
+specify the meaning of the return value of the C \cfunction{system()}
+function, so the return value of the Python function is system-dependent.
+
+On Windows the return value is that returned by the system shell after
+running \var{command}, given by the Windows environment variable
+\code{COMSPEC}: on \code{command.com} systems (Windows 95, 98 and ME)
+this is always \code{0}; on \code{cmd.exe} systems (Windows NT, 2000
+and XP) this is the exit status of the command run; on systems using
+a non-native shell, consult your shell documentation.
+
Availability: \UNIX, Windows.
\end{funcdesc}