ó
ßüÚ\c           @` sw   d  d l  m Z m Z m Z d  d l Z y d  d l Z Wn e k
 rQ d Z n Xe	 a
 d „  Z d „  Z d „  Z d S(   i    (   t   print_functiont   divisiont   absolute_importNc           C` s   t  t j ƒ  ƒ t j d <d S(   s[   
    Enable setting the process title on this process' children and
    grandchildren.
    t   DASK_PARENTN(   t   strt   ost   getpidt   environ(    (    (    s4   lib/python2.7/site-packages/distributed/proctitle.pyt   enable_proctitle_on_children   s    c           C` s
   t  a d S(   s;   
    Enable setting the process title on this process.
    N(   t   Truet   _enabled(    (    (    s4   lib/python2.7/site-packages/distributed/proctitle.pyt   enable_proctitle_on_current   s    c         C` sx   t  d k r d St } | s^ y+ t t j j d d ƒ ƒ t j ƒ  k } Wq^ t k
 rZ q^ Xn  | rt t  j	 |  ƒ n  d S(   sY   
    Change this process' title, as displayed in various utilities
    such as `ps`.
    NR   t    (
   t   setproctitle_modt   NoneR
   t   intR   R   t   getR   t
   ValueErrort   setproctitle(   t   titlet   enabled(    (    s4   lib/python2.7/site-packages/distributed/proctitle.pyR      s    +(   t
   __future__R    R   R   R   R   R   t   ImportErrorR   t   FalseR
   R   R   (    (    (    s4   lib/python2.7/site-packages/distributed/proctitle.pyt   <module>   s   
		