mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
stdlib: Add os.pidfd_open(pid)
This commit is contained in:
committed by
Jelle Zijlstra
parent
9abf314a5b
commit
81a85f18b6
@@ -1024,3 +1024,6 @@ if sys.version_info >= (3, 8):
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def waitstatus_to_exitcode(status: int) -> int: ...
|
||||
|
||||
if sys.platform == "linux":
|
||||
def pidfd_open(pid: int, flags: int = ...) -> int: ...
|
||||
|
||||
@@ -273,7 +273,8 @@ if sys.platform != "win32":
|
||||
from os import CLD_KILLED as CLD_KILLED, CLD_STOPPED as CLD_STOPPED, waitstatus_to_exitcode as waitstatus_to_exitcode
|
||||
|
||||
if sys.platform == "linux":
|
||||
from os import P_PIDFD as P_PIDFD
|
||||
from os import P_PIDFD as P_PIDFD, pidfd_open as pidfd_open
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from os import (
|
||||
POSIX_SPAWN_CLOSE as POSIX_SPAWN_CLOSE,
|
||||
|
||||
@@ -29,7 +29,6 @@ os.copy_file_range
|
||||
os.eventfd
|
||||
os.eventfd_read
|
||||
os.eventfd_write
|
||||
os.pidfd_open
|
||||
os.splice
|
||||
posix.EFD_[A-Z]+
|
||||
posix.SPLICE_[A-Z_]+
|
||||
@@ -37,5 +36,4 @@ posix.copy_file_range
|
||||
posix.eventfd
|
||||
posix.eventfd_read
|
||||
posix.eventfd_write
|
||||
posix.pidfd_open
|
||||
posix.splice
|
||||
|
||||
@@ -3,6 +3,4 @@ select.epoll.register
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
os.copy_file_range
|
||||
os.pidfd_open
|
||||
posix.copy_file_range
|
||||
posix.pidfd_open
|
||||
|
||||
Reference in New Issue
Block a user