Check the return code of pipe

pull/3/head
Quentin BUATHIER 6 years ago
parent cedae6e6f9
commit 00bae113d5

@ -642,7 +642,10 @@ rfbStartOnHoldClient(rfbClientPtr cl)
cl->onHold = FALSE;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
if(cl->screen->backgroundLoop) {
pipe(cl->pipe_notify_client_thread);
if (pipe(cl->pipe_notify_client_thread) == -1) {
cl->pipe_notify_client_thread[0] = -1;
cl->pipe_notify_client_thread[1] = -1;
}
fcntl(cl->pipe_notify_client_thread[0], F_SETFL, O_NONBLOCK);
pthread_create(&cl->client_thread, NULL, clientInput, (void *)cl);

Loading…
Cancel
Save