iochannel/pstream: Support sending file descriptors

This patch adds support to iochannel, pstream and pstream-util
to send file descriptors over a unix pipe.

Currently we don't support writing both creds and fds in the same
packet, it's either one or the other (or neither).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2014-04-15 16:12:25 +02:00
parent 06bc22b220
commit cb484805c1
6 changed files with 102 additions and 22 deletions

View file

@ -29,6 +29,7 @@
/* The tagstruct is freed!*/
void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds);
void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds);
#define pa_pstream_send_tagstruct(p, t) pa_pstream_send_tagstruct_with_creds((p), (t), NULL)