os.close(r) try: if dt=='Real': out=glideinFrontendLib.countRealRunning(elementDescript.merged_data['MatchExprCompiledObj'],condorq_dict_running,glidein_dict) elif dt=='Glidein': count_status_multi={} for glideid in glidein_dict.keys(): request_name=glideid[1] count_status_multi[request_name]={} for st in status_dict_types.keys(): c=glideinFrontendLib.getClientCondorStatus(status_dict_types[st]['dict'],frontend_name,group_name,request_name) count_status_multi[request_name][st]=glideinFrontendLib.countCondorStatus(c) out=count_status_multi else: c,p,h=glideinFrontendLib.countMatch(elementDescript.merged_data['MatchExprCompiledObj'],condorq_dict_types[dt]['dict'],glidein_dict) t=glideinFrontendLib.countCondorQ(condorq_dict_types[dt]['dict']) out=(c,p,h,t) os.write(w,cPickle.dumps(out)) finally: os.close(w) # hard kill myself... don't want any cleanup, since i was created just for this calculation os.kill(os.getpid(),signal.SIGKILL) else: # this is the original # just remember what you did for now os.close(w) pipe_ids[dt]={'r':r,'pid':pid}