+
    Ki	  c                   sJ    R t ^ RIt^ RIt^ RIt^ RIHt 0 Rmt ! R R4      tR# )zProcess managementN)Processc                   sZ   a  ] tR t^!t o RtR t]R 4       t]R 4       tR t	R	R lt
RtV tR# )
ProcessWatcherz,Keeps track of child processes of the clientc                st    V P                  V4      \        ,          V P                  V4      ,
          V n        R# )zCreate a process watcher.
Params:
    exclude_processes (str or list): list of processes that shouldn't be monitored
    include_processes (str or list): list of process that should be forced to be monitored
N)parse_process_listSYSTEM_PROCESSESunmonitored_processes)selfZinclude_processesZexclude_processess   &&&@/usr/lib/python3.14/site-packages/lutris/util/process_watcher.py__init__ZProcessWatcher.__init__$   s2     ##$569II##$56&7"    c                s    V '       g   \        4       # \        V \        4      '       d   \        P                  ! V 4      p V  Uu0 uF  qR,          kK  	  up# u upi )z2Parse a process list that may be given as a string:i    i   N)ZsetZ
isinstanceZstrshlexZsplit)Zprocess_listZp   & r   r   Z!ProcessWatcher.parse_process_list.   sE     5LlC(( ;;|4L!-.A$...s   Ac                 sZ    \        \        P                  ! 4       4      P                  4       # )zIterates through all children process of the lutris client.
This is not accurate since not all processes are started by
lutris but are started by Systemd instead.
)r    osZgetpidZiter_children r   r   iterate_childrenZProcessWatcher.iterate_children8   s     ryy{#1133r   c              #  s   "   V P                  4        FK  pVP                  R 8X  d   K  VP                  '       g   K*  VP                  V P                  9  g   KG  Vx  KM  	  R# 5i)ZZN)r   ZstateZnamer   )r   Zchildr
   r   iterate_processesZ ProcessWatcher.iterate_processes@   sF     **,E{{c!zzzejj0J0JJ -s   6A$A$
A$Nc                s    V'       d'   \         P                  P                  RV,          4       \        V P	                  4       R4      RJ# )z3Returns whether at least one watched process existsz%s
N)sysZstdoutZwriteZnextr   )r   Zmessages   &&r   is_aliveZProcessWatcher.is_aliveH   s7    JJVg-.D**,d34??r   )r   )N)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   Zstaticmethodr   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r   !   sF     67 / / 4 4@ @r   r   >   Z
wineserverZwineconsolez	rpcss.exez
tabtip.exezconhost.exezsvchost.exezwinedbg.exezexplorer.exeziexplore.exezmscorsvw.exezplugplay.exezrundll32.exezservices.exezwinedevice.exe)r   r   r	   r   Zlutris.util.processr    r   r   r   r   r   <module>r      s(     	  
 ' $+@ +@r   