mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add stubs for posix_spawn and posix_spawnp (#5846)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from os import PathLike, stat_result as stat_result
|
||||
from typing import Dict, List, NamedTuple, Optional, overload
|
||||
from _typeshed import StrOrBytesPath
|
||||
from os import PathLike, _ExecEnv, _ExecVArgs, stat_result as stat_result
|
||||
from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Sequence, Tuple, overload
|
||||
|
||||
class uname_result(NamedTuple):
|
||||
sysname: str
|
||||
@@ -166,6 +167,34 @@ def listdir(path: int) -> List[str]: ...
|
||||
@overload
|
||||
def listdir(path: PathLike[str]) -> List[str]: ...
|
||||
|
||||
if sys.platform != "win32" and sys.version_info >= (3, 8):
|
||||
def posix_spawn(
|
||||
path: StrOrBytesPath,
|
||||
argv: _ExecVArgs,
|
||||
env: _ExecEnv,
|
||||
*,
|
||||
file_actions: Optional[Sequence[Tuple[Any, ...]]] = ...,
|
||||
setpgroup: Optional[int] = ...,
|
||||
resetids: bool = ...,
|
||||
setsid: bool = ...,
|
||||
setsigmask: Iterable[int] = ...,
|
||||
setsigdef: Iterable[int] = ...,
|
||||
scheduler: Optional[Tuple[Any, sched_param]] = ...,
|
||||
) -> int: ...
|
||||
def posix_spawnp(
|
||||
path: StrOrBytesPath,
|
||||
argv: _ExecVArgs,
|
||||
env: _ExecEnv,
|
||||
*,
|
||||
file_actions: Optional[Sequence[Tuple[Any, ...]]] = ...,
|
||||
setpgroup: Optional[int] = ...,
|
||||
resetids: bool = ...,
|
||||
setsid: bool = ...,
|
||||
setsigmask: Iterable[int] = ...,
|
||||
setsigdef: Iterable[int] = ...,
|
||||
scheduler: Optional[Tuple[Any, sched_param]] = ...,
|
||||
) -> int: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
environ: Dict[str, str]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user