diff options
author | Miles Bader <miles@gnu.org> | 1995-09-19 18:12:36 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-09-19 18:12:36 +0000 |
commit | 9f95554e24f24a5a545f6811b10a749bfbd8b645 (patch) | |
tree | bdd3cf601b1d6b2bbe41f373e6e6f53af006917d /pflocal/io.c | |
parent | d4bcc4622e45e7f3236bdddaf3c6ca8a458616a8 (diff) |
(S_io_pathconf): New function.
Diffstat (limited to 'pflocal/io.c')
-rw-r--r-- | pflocal/io.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pflocal/io.c b/pflocal/io.c index 53e20c3d..faf47c58 100644 --- a/pflocal/io.c +++ b/pflocal/io.c @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <string.h> /* For bzero() */ -#include <unistd.h> /* For getpid() */ +#include <unistd.h> #include <sys/types.h> #include <sys/fcntl.h> #include <sys/stat.h> @@ -416,6 +416,25 @@ S_io_restrict_auth (struct sock_user *user, *new_port_type = MACH_MSG_TYPE_MAKE_SEND; return sock_create_port (user->sock, new_port); } + +error_t +S_io_pathconf (struct sock_user *user, int name, int *value) +{ + if (user == NULL) + return EOPNOTSUPP; + else if (name == _PC_PIPE_BUF) + { + mutex_lock (&user->sock->lock); + if (user->sock->write_pipe == NULL) + *value = 0; + else + *value = user->sock->write_pipe->write_atomic; + mutex_unlock (&user->sock->lock); + return 0; + } + else + return EINVAL; +} /* Stubs for currently unsupported rpcs. */ |