
    Rpf                     &    d Z ddlZddlZd Zd ZdS )zFA tiny stand alone library to change the kernel process name on Linux.    Nc                  ~    t          t          j                            t          j        d                              dS )zDSets the process name to something better than 'python' if possible.r   N)set_kernel_process_nameospathbasenamesysargv     Q/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/absl/command_name.pymake_process_name_usefulr      s,    "'**38A;7788888r   c                 :   t          | t                    s|                     dd          } 	 t          dd          5 }|                    | dd                    ddd           dS # 1 swxY w Y   dS # t
          $ r 	 ddl}n# t          $ r Y Y dS w xY w	 |                    d          }n# t
          $ r Y Y dS w xY w|	                    d          }|	                    d          }	 |
                    || |||           Y dS # t          $ r Y Y dS w xY ww xY w)	a  Changes the Kernel's /proc/self/status process name on Linux.

  The kernel name is NOT what will be shown by the ps or top command.
  It is a 15 character string stored in the kernel's process table that
  is included in the kernel log when a process is OOM killed.
  The first 15 bytes of name are used.  Non-ASCII unicode is replaced with '?'.

  Does nothing if /proc/self/comm cannot be written or prctl() fails.

  Args:
    name: bytes|unicode, the Linux kernel's command name to set.
  asciireplacez/proc/self/commwbN   r   z	libc.so.6)
isinstancebytesencodeopenwriteEnvironmentErrorctypesImportErrorCDLLc_ulongprctlAttributeError)name	proc_commr   libcpr_set_namezeros         r   r   r      s    
D%	 	  +;;w	**D		&	& !)ood3B3i   ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !	   mmmm   fff[[%%dd   fff..$$K>>!D
jjdD$555555   fffs   A5 A(A5 (A,,A5 /A,0A5 5
D BD
BDBDB.-D.
B=8D<B==-D+D
DDDD)__doc__r   r   r   r   r
   r   r   <module>r%      sH    M L 				 



9 9 9
" " " " "r   