don't die on eof in sendfd
This commit is contained in:
parent
6215fd56f1
commit
c8a93fb753
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue