Skip to content

Commit 2308cc5

Browse files
committed
pythongh-107924: document S_IFSOCK for os.mknod()
Signed-off-by: Christoph Anton Mitterer <[email protected]>
1 parent cc2cf85 commit 2308cc5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/library/os.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,13 +2397,14 @@ features:
23972397

23982398
.. function:: mknod(path, mode=0o600, device=0, *, dir_fd=None)
23992399

2400-
Create a filesystem node (file, device special file or named pipe) named
2401-
*path*. *mode* specifies both the permissions to use and the type of node
2402-
to be created, being combined (bitwise OR) with one of ``stat.S_IFREG``,
2403-
``stat.S_IFCHR``, ``stat.S_IFBLK``, and ``stat.S_IFIFO`` (those constants are
2404-
available in :mod:`stat`). For ``stat.S_IFCHR`` and ``stat.S_IFBLK``,
2405-
*device* defines the newly created device special file (probably using
2406-
:func:`os.makedev`), otherwise it is ignored.
2400+
Create a filesystem node (file, device special file, named pipe or socket)
2401+
named *path*. *mode* specifies both the permissions to use and the type of
2402+
node to be created, being combined (bitwise OR) with one of
2403+
``stat.S_IFREG``, ``stat.S_IFCHR``, ``stat.S_IFBLK``, ``stat.S_IFIFO`` and
2404+
``stat.S_IFSOCK`` (those constants are available in :mod:`stat`). For
2405+
``stat.S_IFCHR`` and ``stat.S_IFBLK``, *device* defines the newly created
2406+
device special file (probably using :func:`os.makedev`), otherwise it is
2407+
ignored.
24072408

24082409
This function can also support :ref:`paths relative to directory descriptors
24092410
<dir_fd>`.

0 commit comments

Comments
 (0)