提交 40c015f5 编写于 作者: D dlong

7162955: Attach api on Solaris, too many open files

Summary: Release server-side socket after client receives it.
Reviewed-by: sla, dsamersoff, dcubed, acorn
Contributed-by: dean.long@oracle.com
上级 0e527a20
......@@ -336,7 +336,9 @@ extern "C" {
// Return 0 (success) + file descriptor, or non-0 (error)
if (res == 0) {
door_desc_t desc;
desc.d_attributes = DOOR_DESCRIPTOR;
// DOOR_RELEASE flag makes sure fd is closed after passing it to
// the client. See door_return(3DOOR) man page.
desc.d_attributes = DOOR_DESCRIPTOR | DOOR_RELEASE;
desc.d_data.d_desc.d_descriptor = return_fd;
door_return((char*)&res, sizeof(res), &desc, 1);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册