#1579477: mention necessity to flush output before exec'ing

This commit is contained in:
Andrew M. Kuchling 2008-09-28 00:15:27 +00:00
parent 4008ef0fe3
commit ac77166e90

View file

@ -1453,6 +1453,12 @@ to be ignored.
and will have the same process id as the caller. Errors will be reported as and will have the same process id as the caller. Errors will be reported as
:exc:`OSError` exceptions. :exc:`OSError` exceptions.
The current process is replaced immediately. Open file objects and
descriptors are not flushed, so if there may be data buffered
on these open files, you should flush them using
:func:`sys.stdout.flush` or :func:`os.fsync` before calling an
:func:`exec\*` function.
The "l" and "v" variants of the :func:`exec\*` functions differ in how The "l" and "v" variants of the :func:`exec\*` functions differ in how
command-line arguments are passed. The "l" variants are perhaps the easiest command-line arguments are passed. The "l" variants are perhaps the easiest
to work with if the number of parameters is fixed when the code is written; the to work with if the number of parameters is fixed when the code is written; the
@ -1477,8 +1483,9 @@ to be ignored.
used to define the environment variables for the new process (these are used used to define the environment variables for the new process (these are used
instead of the current process' environment); the functions :func:`execl`, instead of the current process' environment); the functions :func:`execl`,
:func:`execlp`, :func:`execv`, and :func:`execvp` all cause the new process to :func:`execlp`, :func:`execv`, and :func:`execvp` all cause the new process to
inherit the environment of the current process. Availability: Unix, inherit the environment of the current process.
Windows.
Availability: Unix, Windows.
.. function:: _exit(n) .. function:: _exit(n)