summaryrefslogtreecommitdiff
path: root/pflocal/sserver.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-20 22:27:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-20 22:27:44 +0100
commit0da2914ac9d9321cca2d402b2c505881e436c725 (patch)
tree56d77172f8126e4b4324e53dfbed36fade48110f /pflocal/sserver.c
parent03f8e9b08a9d4f5034ea1a27c3a8e86d9b147306 (diff)
pflocal: Add support for access() on pipes
bash's '<(' helper creates a pipe and gives /dev/fd/63 to the program, and gcc would then run access() on it. So we actually need to support at least some FS operations on pipes. * pflocal/fs.c: New file. * pflocal/mig-mutate.h (FILE_INTRAN, FILE_INTRAN_PAYLOAD, FILE_DESTRUCTOR, FILE_IMPORTS): New macros. * pflocal/sserver.c: Include "fs_S.h". (sock_demuxer): Call fs_server_routine. * pflocal/Makefile (SRCS): Add fs.c. (MIGSTUBS): Add fsServer.o.
Diffstat (limited to 'pflocal/sserver.c')
-rw-r--r--pflocal/sserver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pflocal/sserver.c b/pflocal/sserver.c
index 7df69a41..e500a75f 100644
--- a/pflocal/sserver.c
+++ b/pflocal/sserver.c
@@ -33,6 +33,7 @@ static int sock_server_active = 0;
static pthread_spinlock_t sock_server_active_lock = PTHREAD_SPINLOCK_INITIALIZER;
#include "io_S.h"
+#include "fs_S.h"
#include "socket_S.h"
#include "../libports/interrupt_S.h"
#include "../libports/notify_S.h"
@@ -43,6 +44,7 @@ sock_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
{
mig_routine_t routine;
if ((routine = io_server_routine (inp)) ||
+ (routine = fs_server_routine (inp)) ||
(routine = socket_server_routine (inp)) ||
(routine = ports_interrupt_server_routine (inp)) ||
(routine = ports_notify_server_routine (inp)))