$sockets = [];
\socket_create_pair(AF_UNIX,SOCK_DGRAM,0,$sockets);
$proc = new \Swoole\Process(function()use($sockets){
socket_close($sockets[0]);
$f = fopen(__FILE__,'r');
var_dump($f);
socket_sendmsg($sockets[1],[ 'control'=>[['level'=>SOL_SOCKET,'type'=>SCM_RIGHTS,'data'=>[$f]] ] ],0);
sleep(10);
},false,2,1);
$proc->start();
socket_close($sockets[1]);
$data = [
'controllen'=>socket_cmsg_space(SOL_SOCKET,SCM_RIGHTS,1)
];
socket_recvmsg($sockets[0],$data,0);
var_dump($data);
sleep(10);