summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-01-01 10:28:21 +0000
committerpeter <peter@FreeBSD.org>1996-01-01 10:28:21 +0000
commitca76751ddce821b18a9f1944e32f14f2b9734740 (patch)
tree1b78fa4a1c049de0e5b65aee48a654591ed57d15
parent76ccec8b122f93562a3d98509b943d6cd9eff112 (diff)
downloadFreeBSD-src-ca76751ddce821b18a9f1944e32f14f2b9734740.zip
FreeBSD-src-ca76751ddce821b18a9f1944e32f14f2b9734740.tar.gz
Make pipe() return a set of bidirectional pipe fd's rather than one-way only
just like on SVR4. This has no effect on any current programs in our source, but makes the use of SVR4 code a little easier. There is no code or implementation cost in the kernel.. This two-line change merely sets the modes on the ends of the pipes to be bidirectional. There are no other changes.
-rw-r--r--sys/kern/uipc_syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 18de8ca..8d7cc57 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
- * $Id: uipc_syscalls.c,v 1.9 1995/10/23 15:42:12 bde Exp $
+ * $Id: uipc_syscalls.c,v 1.10 1995/12/14 22:51:04 bde Exp $
*/
#include <sys/param.h>
@@ -1040,14 +1040,14 @@ pipe(p, uap, retval)
if (error)
goto free2;
retval[0] = fd;
- rf->f_flag = FREAD;
+ rf->f_flag = FREAD | FWRITE;
rf->f_type = DTYPE_SOCKET;
rf->f_ops = &socketops;
rf->f_data = (caddr_t)rso;
error = falloc(p, &wf, &fd);
if (error)
goto free3;
- wf->f_flag = FWRITE;
+ wf->f_flag = FREAD | FWRITE;
wf->f_type = DTYPE_SOCKET;
wf->f_ops = &socketops;
wf->f_data = (caddr_t)wso;
OpenPOWER on IntegriCloud