os.windows.process
==================

.. py:module:: os.windows.process


Functions
---------

.. autoapisummary::

   os.windows.process.process_exit_code
   os.windows.process.wait_for_objects


Module Contents
---------------

.. py:function:: process_exit_code(handle: int) -> int | None

   Retrieve process exit code.

   Note that the method used ensure the process stays in a waitable state

   :param handle: process handle
   :return: the exit code if process is finished or None otherwise
   :raise: WindowsError in case the handle is invalid


.. py:function:: wait_for_objects(object_list: list[int], timeout: int = 0, wait_for_all: bool = False) -> int | None

   Wait until list of object are in signaled state.

   :param object_list: a list of handles
   :param timeout: maximum waiting time in seconds. If 0 then maximum waiting
       time is set to infinity
   :param wait_for_all: if True wait for all object to be signaled. If False
       wait for one object to be signaled
   :return: index in the object list of the signaled object or None in case
       of timeout
   :raise: WindowsError


