don't die on eof in sendfd
This commit is contained in:
parent
6215fd56f1
commit
c8a93fb753
@ -78,7 +78,10 @@ recvfd(int s)
|
||||
|
||||
if((n=recvmsg(s, &msg, 0)) < 0)
|
||||
return -1;
|
||||
|
||||
if(n == 0){
|
||||
werrstr("unexpected EOF");
|
||||
return -1;
|
||||
}
|
||||
cmsg = CMSG_FIRSTHDR(&msg);
|
||||
fd = *(int*)CMSG_DATA(cmsg);
|
||||
return fd;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user