]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19207: Improved cross-references in the os, os.path, and posix modules
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 13 Oct 2013 17:13:37 +0000 (20:13 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 13 Oct 2013 17:13:37 +0000 (20:13 +0300)
documentation.

1  2 
Doc/library/os.path.rst
Doc/library/os.rst

index 6e1d4942c74618c1c943a7979e1fd2b712c8f31f,36f2d14b0a440843f5c65d099f1f5e64867e48af..25cae6b962e078ef3c252588a2fc67c6b5f369d4
@@@ -271,14 -273,11 +271,14 @@@ the :mod:`glob` module.
  .. function:: samestat(stat1, stat2)
  
     Return ``True`` if the stat tuples *stat1* and *stat2* refer to the same file.
-    These structures may have been returned by :func:`fstat`, :func:`lstat`, or
-    :func:`stat`.  This function implements the underlying comparison used by
-    :func:`samefile` and :func:`sameopenfile`.
+    These structures may have been returned by :func:`os.fstat`,
+    :func:`os.lstat`, or :func:`os.stat`.  This function implements the
+    underlying comparison used by :func:`samefile` and :func:`sameopenfile`.
  
 -   Availability: Unix.
 +   Availability: Unix, Windows.
 +
 +   .. versionchanged:: 3.4
 +      Added Windows support.
  
  
  .. function:: split(path)
index 2e46194e57c2c304a310ddb5c8b940ace034b45a,59457f75acd77c46481b1e5afd0873f2f031ed5e..466f2426d447ed0f2cb23e6bc4a3e4e3c8442acd
@@@ -1201,49 -1189,6 +1201,49 @@@ Querying the size of a termina
        Height of the terminal window in characters.
  
  
- and stderr), which are always inherited.  Using :func:`os.spawn*` functions,
 +.. _fd_inheritance:
 +
 +Inheritance of File Descriptors
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +.. versionadded:: 3.4
 +
 +A file descriptor has an "inheritable" flag which indicates if the file descriptor
 +can be inherited by child processes.  Since Python 3.4, file descriptors
 +created by Python are non-inheritable by default.
 +
 +On UNIX, non-inheritable file descriptors are closed in child processes at the
 +execution of a new program, other file descriptors are inherited.
 +
 +On Windows, non-inheritable handles and file descriptors are closed in child
 +processes, except for standard streams (file descriptors 0, 1 and 2: stdin, stdout
++and stderr), which are always inherited.  Using :func:`spawn\* <spawnl>` functions,
 +all inheritable handles and all inheritable file descriptors are inherited.
 +Using the :mod:`subprocess` module, all file descriptors except standard
 +streams are closed, and inheritable handles are only inherited if the
 +*close_fds* parameter is ``False``.
 +
 +.. function:: get_inheritable(fd)
 +
 +   Get the "inheritable" flag of the specified file descriptor (a boolean).
 +
 +.. function:: set_inheritable(fd, inheritable)
 +
 +   Set the "inheritable" flag of the specified file descriptor.
 +
 +.. function:: get_handle_inheritable(handle)
 +
 +   Get the "inheritable" flag of the specified handle (a boolean).
 +
 +   Availability: Windows.
 +
 +.. function:: set_handle_inheritable(handle, inheritable)
 +
 +   Set the "inheritable" flag of the specified handle.
 +
 +   Availability: Windows.
 +
 +
  .. _os-file-dir:
  
  Files and Directories