diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2010-08-19 02:18:39 -0400 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2010-08-19 02:18:39 -0400 |
| commit | 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e (patch) | |
| tree | a3cdcd9da4d88203feca3c72607ec2ffddb47ff9 /usr/src/lib/libc/port/gen/mkfifo.c | |
| parent | 1356956d0b091aa705b3e6330c7224417baa3a89 (diff) | |
| parent | dfea898ab532c75e4d1426e0ff2cc5e0d67aa72f (diff) | |
| download | illumos-joyent-6a634c9dca3093f3922e4b7ab826d7bdf17bf78e.tar.gz | |
merge with onnv_147
Reviewed by: garrett@nexenta.com
Approved by: garrett@nexenta.com
Diffstat (limited to 'usr/src/lib/libc/port/gen/mkfifo.c')
| -rw-r--r-- | usr/src/lib/libc/port/gen/mkfifo.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/src/lib/libc/port/gen/mkfifo.c b/usr/src/lib/libc/port/gen/mkfifo.c index eb73e03184..ac2897c92a 100644 --- a/usr/src/lib/libc/port/gen/mkfifo.c +++ b/usr/src/lib/libc/port/gen/mkfifo.c @@ -20,28 +20,31 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * mkfifo(3c) - create a named pipe (FIFO). This code provides * a POSIX mkfifo function. - * */ -#pragma weak _mkfifo = mkfifo - #include "lint.h" #include <sys/types.h> #include <sys/stat.h> int +mkfifoat(int fd, const char *path, mode_t mode) +{ + mode &= 0777; /* only allow file access permissions */ + mode |= S_IFIFO; /* creating a FIFO */ + return (mknodat(fd, path, mode, 0)); +} + +#pragma weak _mkfifo = mkfifo +int mkfifo(const char *path, mode_t mode) { mode &= 0777; /* only allow file access permissions */ |
