Retry wait() on EINTR; clean up signal handling
Retry wait() on EINTR; clean up signal handling

Test Plan: subprocess_test

Reviewed By: delong.j@fb.com

FB internal diff: D619713

yangjin-unique/folly,mqeizi/folly,raphaelamorim/folly,KSreeHarsha/folly,constantine001/folly,Eagle-X/folly,yangjin-unique/folly,renyinew/folly,romange/folly,lifei/folly,gavioto/folly,renyinew/folly,tempbottle/folly,upsoft/folly,nickhen/folly,sakishum/folly,mqeizi/folly,kernelim/folly,bobegir/folly,charsyam/folly,chjp2046/folly,xzmagic/folly,stonegithubs/folly,floxard/folly,SeanRBurton/folly,reddit/folly,loverszhaokai/folly,tomhughes/folly,rklabs/folly,zhiweicai/folly,chjp2046/folly,shaobz/folly,PPC64/folly,clearlylin/folly,loversInJapan/folly,leolujuyi/folly,gavioto/folly,zhiweicai/folly,mqeizi/folly,arg0/folly,brunomorishita/folly,arg0/folly,raphaelamorim/folly,bobegir/folly,Eagle-X/folly,cppfool/folly,clearlinux/folly,project-zerus/folly,leolujuyi/folly,guker/folly,PoisonBOx/folly,clearlylin/folly,KSreeHarsha/folly,doctaweeks/folly,doctaweeks/folly,doctaweeks/folly,cppfool/folly,Orvid/folly,clearlylin/folly,colemancda/folly,lifei/folly,unmeshvrije/C--,charsyam/folly,shaobz/folly,tempbottle/folly,loverszhaokai/folly,hongliangzhao/folly,clearlinux/folly,fw1121/folly,hongliangzhao/folly,project-zerus/folly,gavioto/folly,brunomorishita/folly,loversInJapan/folly,brunomorishita/folly,Eagle-X/folly,Hincoin/folly,ykarlsbrun/folly,sakishum/folly,project-zerus/folly,bowlofstew/folly,sonnyhu/folly,kernelim/folly,romange/folly,romange/folly,ykarlsbrun/folly,tempbottle/folly,constantine001/folly,cole14/folly,cole14/folly,KSreeHarsha/folly,Hincoin/folly,upsoft/folly,mqeizi/folly,shaobz/folly,renyinew/folly,wildinto/folly,chjp2046/folly,zhiweicai/folly,cppfool/folly,SammyK/folly,Orvid/folly,cppfool/folly,facebook/folly,zhiweicai/folly,bikong2/folly,hongliangzhao/folly,sonnyhu/folly,lifei/folly,bobegir/folly,CJstar/folly,juniway/folly,bsampath/folly,nickhen/folly,guker/folly,SeanRBurton/folly,bobegir/folly,wildinto/folly,rklabs/folly,floxard/folly,sonnyhu/folly,cole14/folly,upsoft/folly,CJstar/folly,KSreeHarsha/folly,SammyK/folly,bikong2/folly,Eagle-X/folly,alexst07/folly,clearlylin/folly,stonegithubs/folly,stonegithubs/folly,unmeshvrije/C--,reddit/folly,PoisonBOx/folly,arg0/folly,project-zerus/folly,kernelim/folly,lifei/folly,xzmagic/folly,bikong2/folly,renyinew/folly,Orvid/folly,gaoyingie/folly,clearlinux/folly,renyinew/folly,PoisonBOx/folly,gaoyingie/folly,Eagle-X/folly,Orvid/folly,gaoyingie/folly,reddit/folly,arg0/folly,juniway/folly,wildinto/folly,tomhughes/folly,ykarlsbrun/folly,bikong2/folly,floxard/folly,SammyK/folly,project-zerus/folly,reddit/folly,loverszhaokai/folly,stonegithubs/folly,PPC64/folly,sonnyhu/folly,constantine001/folly,shaobz/folly,bowlofstew/folly,guker/folly,yangjin-unique/folly,romange/folly,loversInJapan/folly,stonegithubs/folly,KSreeHarsha/folly,SeanRBurton/folly,theiver9827/folly,juniway/folly,gavioto/folly,shaobz/folly,upsoft/folly,Hincoin/folly,juniway/folly,bsampath/folly,rklabs/folly,bowlofstew/folly,kernelim/folly,loversInJapan/folly,loversInJapan/folly,sonnyhu/folly,tempbottle/folly,cole14/folly,alexst07/folly,chjp2046/folly,reddit/folly,constantine001/folly,CJstar/folly,wildinto/folly,chjp2046/folly,guker/folly,SeanRBurton/folly,bobegir/folly,alexst07/folly,raphaelamorim/folly,juniway/folly,hongliangzhao/folly,cppfool/folly,facebook/folly,facebook/folly,SeanRBurton/folly,loverszhaokai/folly,theiver9827/folly,colemancda/folly,sakishum/folly,leolujuyi/folly,theiver9827/folly,leolujuyi/folly,bsampath/folly,colemancda/folly,leolujuyi/folly,colemancda/folly,fw1121/folly,clearlinux/folly,unmeshvrije/C--,zhiweicai/folly,unmeshvrije/C--,rklabs/folly,SammyK/folly,gavioto/folly,theiver9827/folly,tomhughes/folly,mqeizi/folly,clearlylin/folly,bsampath/folly,PPC64/folly,Hincoin/folly,raphaelamorim/folly,bikong2/folly,raphaelamorim/folly,nickhen/folly,ykarlsbrun/folly,floxard/folly,clearlinux/folly,PPC64/folly,Hincoin/folly,wildinto/folly,fw1121/folly,bowlofstew/folly,facebook/folly,fw1121/folly,Orvid/folly,tomhughes/folly,brunomorishita/folly,charsyam/folly,facebook/folly,yangjin-unique/folly,alexst07/folly,SammyK/folly,xzmagic/folly,upsoft/folly,hongliangzhao/folly,xzmagic/folly,bowlofstew/folly,tomhughes/folly,gaoyingie/folly,constantine001/folly,sakishum/folly,alexst07/folly,unmeshvrije/C--,CJstar/folly,doctaweeks/folly,kernelim/folly,PPC64/folly,CJstar/folly,loverszhaokai/folly,ykarlsbrun/folly,PoisonBOx/folly,fw1121/folly,doctaweeks/folly,gaoyingie/folly,PoisonBOx/folly,sakishum/folly,arg0/folly,colemancda/folly,xzmagic/folly,yangjin-unique/folly,theiver9827/folly,brunomorishita/folly,nickhen/folly,bsampath/folly,nickhen/folly,guker/folly,lifei/folly,charsyam/folly,cole14/folly,romange/folly,unmeshvrije/C--,floxard/folly,tempbottle/folly,rklabs/folly