def _launch_reaper(id, pid):
 from subprocess import Popen, PIPE
 me = __file__
 if me.endswith('.pyc'):
  me = me[:(-1)]
 myloc = os.path.dirname(me)
 if (not myloc):
  myloc = os.getcwd()
 reaper_cmd = os.path.join(myloc, 'run_on_me_or_pid_quit')
 Popen([reaper_cmd, str(pid), me, '--free', str(id)], stdout=open('/dev/null', 'w'))

def _launch_reaper ( id , pid ) : from subprocess import Popen , PIPE me = __file__ if me . endswith ( '.pyc' ) : me = me [ : ( - 1 ) ] myloc = os . path . dirname ( me ) if ( not myloc ) : myloc = os . getcwd ( ) reaper_cmd = os . path . join ( myloc , 'run_on_me_or_pid_quit' ) Popen ( [ reaper_cmd , str ( pid ) , me , '--free' , str ( id ) ] , stdout = open ( '/dev/null' , 'w' ) )
start a process that will free a lock when process pid terminates .