beam: Make extracted Fds CloseOnExec
beam: Make extracted Fds CloseOnExec

Grab forklock to make sure no forks accidentally inherit the new fds
before they are made CLOEXEC There is a slight race condition between
ReadMsgUnix returns and when we grap the lock, so this is not
perfect. Unfortunately There is no way to pass MSG_CMSG_CLOEXEC to
recvmsg() nor any way to implement non-blocking i/o in go, so this is
hard to fix.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

cgvarela/swarm,bdwill/docker.github.io,beni55/swarm-1,bpradipt/swarm,Aorjoa/swarm,danix800/docker.github.io,rajdeepd/swarm,auzias/swarm,errordeveloper/swarm,BSWANG/denverdino.github.io,shin-/docker.github.io,jimmyxian/swarm,auzias/swarm,joeuo/docker.github.io,abronan/swarm,phiroict/docker,therealbill/swarm,shubheksha/docker.github.io,aluzzardi/swarm,jzwlqx/denverdino.github.io,jzwlqx/denverdino.github.io,londoncalling/docker.github.io,liubin/swarm,cpuguy83/swarm,swarm-hooks/swarm,londoncalling/docker.github.io,denverdino/docker.github.io,tnachen/swarm,resouer/swarm,u2mejc/swarm,LuisBosquez/docker.github.io,FreedomWangLi/swarm,CiaranCostello/swarm,joaofnfernandes/docker.github.io,aduermael/docker.github.io,ricca742/swarm,moxiegirl/swarm,aidora/pisces,bsmr-docker/swarm,mgoelzer/swarm,anweiss/docker.github.io,docker-zh/docker.github.io,BSWANG/swarm,docker-zh/docker.github.io,rchicoli/swarm,megamsys/swarm,johnstep/docker.github.io,barais/swarm,thaJeztah/docker.github.io,gonkulator/swarm,rutulpatel/swarm,aduermael/docker.github.io,sanscontext/docker.github.io,anweiss/docker.github.io,marsmensch/swarm,echupriyanov/swarm,shin-/docker.github.io,JimGalasyn/docker.github.io,docker-zh/docker.github.io,JimGalasyn/docker.github.io,yp-engineering/swarm,Spritekin/swarm,BSWANG/denverdino.github.io,ezrasilvera/swarm,zkcrescent/swarm,megamsys/swarm,qianzhangxa/swarm,sanscontext/docker.github.io,kyhavlov/swarm,BSWANG/denverdino.github.io,anweiss/docker.github.io,FollowMyDev/swarm,ehazlett/swarm,Spritekin/swarm,docker/docker.github.io,gdevillele/docker.github.io,shakamunyi/swarm,christophelec/swarm,sanscontext/docker.github.io,parapsyche/swarm,ehazlett/swarm,shubheksha/docker.github.io,bdwill/docker.github.io,joaofnfernandes/docker.github.io,JimGalasyn/docker.github.io,rillig/docker.github.io,bfirsh/swarm,LuisBosquez/docker.github.io,rav121/swarm,denverdino/denverdino.github.io,jeffjen/swarm,parapsyche/swarm,mavenugo/swarm,jzwlqx/denverdino.github.io,krystism/swarm,shubheksha/docker.github.io,londoncalling/docker.github.io,denverdino/docker.github.io,ejholmes/swarm,iaintshine/swarm,affo/swarm,shin-/docker.github.io,pssahi/swarm,shin-/docker.github.io,unodba/swarm,sfsmithcha/swarm,therealbill/swarm,liubin/swarm,jeffjen/swarm,barais/swarm,gonkulator/swarm,vieux/swarm,joaofnfernandes/docker.github.io,LuisBosquez/docker.github.io,aduermael/docker.github.io,ealang/swarm,johnstep/docker.github.io,Aorjoa/swarm,pdevine/swarm,ch3lo/swarm,rajdeepd/swarm,bsmr-docker/swarm,mountkin/swarm,dims/swarm,FreedomWangLi/swarm,jimmycmh/swarm,FollowMyDev/swarm,jimenez/swarm,pssahi/swarm,rillig/docker.github.io,kyhavlov/swarm,linecheng/swarm,troy0820/docker.github.io,jzwlqx/denverdino.github.io,shahankhatch/swarm,phiroict/docker,rillig/docker.github.io,denverdino/denverdino.github.io,akerbis/armhf-swarm,JimGalasyn/docker.github.io,unodba/swarm,EderRoger/swarm,MHBauer/swarm,LuisBosquez/docker.github.io,yp-engineering/swarm,londoncalling/docker.github.io,LukasBacigal/swarm,kunalkushwaha/swarm,ezrasilvera/SwarmACLs,krystism/swarm,raoofm/swarm,schmunk42/swarm,anweiss/docker.github.io,akerbis/armhf-swarm,denverdino/denverdino.github.io,BSWANG/denverdino.github.io,vieux/swarm,snrism/swarm,denverdino/swarm-1,riuvshin/swarm,phiroict/docker,morpheyesh/swarm,adouang/swarm,shahankhatch/swarm,francisbouvier/swarm,johnstep/docker.github.io,alexisbellido/docker.github.io,denverdino/denverdino.github.io,tnachen/swarm,joaofnfernandes/docker.github.io,denverdino/swarm-1,mrjana/swarm,BSWANG/denverdino.github.io,bdwill/docker.github.io,snrism/swarm,vlajos/swarm,gradywang/swarm,everett-toews/swarm,phiroict/docker,bdwill/docker.github.io,sanscontext/docker.github.io,danix800/docker.github.io,BSWANG/swarm,chanwit/swarm,aduermael/docker.github.io,docker/docker.github.io,joeuo/docker.github.io,gdevillele/docker.github.io,gradywang/swarm,docker/docker.github.io,xFragger/swarm,denverdino/docker.github.io,SivagnanamCiena/swarm,atlassian/swarm,menglingwei/denverdino.github.io,joeuo/docker.github.io,vlajos/swarm,cgvarela/swarm,jay-lau/swarm,johnstep/docker.github.io,francisbouvier/swarm,jay-lau/swarm,echupriyanov/swarm,mavenugo/swarm,rav121/swarm,beni55/swarm-1,anweiss/docker.github.io,gdevillele/docker.github.io,rutulpatel/swarm,swarm-hooks/swarm,mrjana/swarm,EderRoger/swarm,u2mejc/swarm,marsmensch/swarm,gdevillele/docker.github.io,shot/swarm,fugr/swarm,zkcrescent/swarm,aluzzardi/swarm,NunoEdgarGub1/swarm,shubheksha/docker.github.io,denverdino/docker.github.io,iaintshine/swarm,CiaranCostello/swarm,jimmyxian/swarm,ch3lo/swarm,SivagnanamCiena/swarm,doronp/swarm,joeuo/docker.github.io,cpuguy83/swarm,JimGalasyn/docker.github.io,christophelec/swarm,polyverse-security/swarm,bfirsh/swarm,troy0820/docker.github.io,dnephin/swarm,dnephin/swarm,errordeveloper/swarm,mgoelzer/swarm,menglingwei/denverdino.github.io,fugr/swarm,thaJeztah/docker.github.io,moxiegirl/swarm,rchicoli/swarm,thaJeztah/docker.github.io,bpradipt/swarm,xFragger/swarm,docker-zh/docker.github.io,menglingwei/denverdino.github.io,bdwill/docker.github.io,docker-zh/docker.github.io,docker/docker.github.io,everett-toews/swarm,MHBauer/swarm,thaJeztah/docker.github.io,deis/swarm,menglingwei/denverdino.github.io,alexisbellido/docker.github.io,alexisbellido/docker.github.io,mountkin/swarm,pdevine/swarm,rancher/swarm,denverdino/swarm,docker/docker.github.io,shin-/docker.github.io,joaofnfernandes/docker.github.io,jimmycmh/swarm,srikalyan/swarm,jimenez/swarm,srikalyan/swarm,tranceitionalMynd/swarm,chanwit/swarm,riuvshin/swarm,affo/swarm,adouang/swarm,LuisBosquez/docker.github.io,morpheyesh/swarm,ezrasilvera/SwarmACLs,danix800/docker.github.io,kunalkushwaha/swarm,shot/swarm,troy0820/docker.github.io,schmunk42/swarm,CodeNow/swarm,thaJeztah/docker.github.io,phiroict/docker,denverdino/denverdino.github.io,ealang/swarm,qianzhangxa/swarm,PeoplePerHour/libswarm,rancher/swarm,deis/swarm,allencloud/swarm,resouer/swarm,danix800/docker.github.io,menglingwei/denverdino.github.io,CodeNow/swarm,denverdino/swarm,abronan/swarm,LukasBacigal/swarm,jdamick/swarm,raoofm/swarm,NunoEdgarGub1/swarm,londoncalling/docker.github.io,linecheng/swarm,atlassian/swarm,gdevillele/docker.github.io,sanscontext/docker.github.io,sfsmithcha/swarm,doronp/swarm,troy0820/docker.github.io,rillig/docker.github.io,tangkun75/swarm,alexisbellido/docker.github.io,polyverse-security/swarm,shubheksha/docker.github.io,ezrasilvera/swarm,jzwlqx/denverdino.github.io,tangkun75/swarm,allencloud/swarm,shakamunyi/swarm,ricca742/swarm,PeoplePerHour/libswarm,ejholmes/swarm,alexisbellido/docker.github.io,tranceitionalMynd/swarm,dims/swarm,jdamick/swarm,joeuo/docker.github.io,denverdino/docker.github.io,aidora/pisces,johnstep/docker.github.io