summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-01-17 13:46:55 -0800
committerKeith Packard <keithp@keithp.com>2013-10-31 16:58:28 -0700
commitfdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3 (patch)
treefb668e21ad877c1719181d672836806bcff318fe /os
parent9fd35daa3160fd36f00ed354bfcbefefa1353cce (diff)
Add support for MIT-SHM AttachFd request
This passes a file descriptor from the client to the server, which is then mmap'd Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os')
-rw-r--r--os/io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/os/io.c b/os/io.c
index 83df6e9b0..a20faa56f 100644
--- a/os/io.c
+++ b/os/io.c
@@ -506,6 +506,14 @@ ReadFdFromClient(ClientPtr client)
return fd;
}
+int
+WriteFdToClient(ClientPtr client, int fd, Bool do_close)
+{
+ OsCommPtr oc = (OsCommPtr) client->osPrivate;
+
+ return _XSERVTransSendFd(oc->trans_conn, fd, do_close);
+}
+
/*****************************************************************
* InsertFakeRequest
* Splice a consed up (possibly partial) request in as the next request.