diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 762da9b1b4dca3..67754a7299df05 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -662,7 +662,10 @@ execute, will be re-raised in the parent. The most common exception raised is :exc:`OSError`. This occurs, for example, when trying to execute a non-existent file. Applications should prepare for -:exc:`OSError` exceptions. +:exc:`OSError` exceptions. Note that, when ``"shell=True"``, :exc:`OSError` +will be raised by the child only if the selected shell itself was not found. +To determine if the shell failed to find the requested application, it is +necessary to check the return code or output from the subprocess. A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid arguments.