changeset 3294:6f0612ea55ce

Merge
author jprovino
date Wed, 02 May 2012 15:47:06 -0400
parents d6c393b0164b 973046802b6f
children bb18e8eecb7e
files
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/solaris/vm/attachListener_solaris.cpp	Wed Apr 25 15:06:51 2012 -0700
+++ b/src/os/solaris/vm/attachListener_solaris.cpp	Wed May 02 15:47:06 2012 -0400
@@ -336,7 +336,9 @@
     // 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 {