Browse Source

Apply the fix suggested for uninitialized pipe non-blocking (#219) (#220)

* Apply the fix suggested for uninitialized pipe non-blocking (#219)
Don Porter 4 years ago
parent
commit
37c2aae10c

+ 1 - 1
LibOS/shim/test/apps/lmbench/lmbench-2.5

@@ -1 +1 @@
-Subproject commit 806efeeee2a5a896a251ba44be37410ec7776c90
+Subproject commit 9433b25b2c8a5af2270a14aa9eacc351d7b4d5ee

+ 1 - 0
Pal/src/host/FreeBSD/db_pipes.c

@@ -169,6 +169,7 @@ static int pipe_waitforclient (PAL_HANDLE handle, PAL_HANDLE * client)
     SET_HANDLE_TYPE(clnt, pipecli);
     clnt->__in.flags |= RFD(0)|WFD(0)|WRITEABLE(0);
     clnt->pipe.fd = newfd;
+    clnt->pipe.nonblocking = PAL_FALSE;
     clnt->pipe.pipeid = handle->pipe.pipeid;
     *client = clnt;
 #endif

+ 1 - 0
Pal/src/host/Linux-SGX/db_pipes.c

@@ -105,6 +105,7 @@ static int pipe_waitforclient (PAL_HANDLE handle, PAL_HANDLE * client)
     SET_HANDLE_TYPE(clnt, pipecli);
     HANDLE_HDR(clnt)->flags |= RFD(0)|WFD(0)|WRITEABLE(0);
     clnt->pipe.fd = ret;
+    clnt->pipe.nonblocking = PAL_FALSE;
     clnt->pipe.pipeid = handle->pipe.pipeid;
     *client = clnt;
 

+ 1 - 0
Pal/src/host/Linux/db_pipes.c

@@ -169,6 +169,7 @@ static int pipe_waitforclient (PAL_HANDLE handle, PAL_HANDLE * client)
     HANDLE_HDR(clnt)->flags |= RFD(0)|WFD(0)|WRITEABLE(0);
     clnt->pipe.fd = newfd;
     clnt->pipe.pipeid = handle->pipe.pipeid;
+    clnt->pipe.nonblocking = PAL_FALSE;
     *client = clnt;
 #endif