from collections.abc import Callable

__all__ = ["BaseProcess", "Process", "active_children", "current_process"]

def current_process() -> BaseProcess: ...
def active_children(_cleanup: Callable[[], None] = ...) -> list[BaseProcess]: ...

class BaseProcess:
    name: str
    def __init__(
        self,
        group: None = ...,
        target: Callable[..., object] | None = ...,
        name: str | None = ...,
        args: tuple[object, ...] = ...,
        kwargs: dict[str, object] = ...,
        daemon: bool | None = ...,
        **_kw: object,
    ) -> None: ...
    def run(self) -> None: ...
    def start(self) -> None: ...
    def close(self) -> None: ...
    def terminate(self) -> None: ...
    def terminate_controlled(self) -> None: ...
    def join(self, timeout: int | None = None) -> None: ...
    def is_alive(self) -> bool: ...
    @property
    def daemon(self) -> bool: ...
    @daemon.setter
    def daemon(self, name: bool) -> None: ...
    @property
    def authkey(self) -> AuthenticationString: ...
    @authkey.setter
    def authkey(self, authkey: AuthenticationString) -> None: ...
    @property
    def exitcode(self) -> int | None: ...
    @property
    def ident(self) -> int | None: ...

    pid = ident

    @property
    def sentinel(self) -> int: ...

class AuthenticationString(bytes): ...

class _MainProcess(BaseProcess):
    def __init__(self) -> None: ...

Process = BaseProcess
