File: //lib/python2.7/site-packages/azurelinuxagent/common/utils/extensionprocessutil.pyc
�
d�bc @ s~ d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m Z d Z d � Z
d � Z d � Z d � Z
d S( i����N( t ExtensionErrorCodest ExtensionOperationErrort ExtensionError( t ustri� c C s� x9 | d k r; | j � d k r; t j d � | d 8} q Wd } | d k rp t j t j | j � t j � n t j d � | j
� } | d k | f S( s�
Utility function that waits for the process to complete within the given time frame. This function will terminate
the process if when the given time frame elapses.
:param process: Reference to a running process
:param timeout: Number of seconds to wait for the process to complete before killing it
:return: Two parameters: boolean for if the process timed out and the return code of the process (None if timed out)
i i N( t pollt Nonet timet sleept ost killpgt getpgidt pidt signalt SIGKILLt wait( t processt timeoutt return_code( ( sU /usr/lib/python2.7/site-packages/azurelinuxagent/common/utils/extensionprocessutil.pyt&