Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys Refine the documentation



details:   https://anonhg.NetBSD.org/src/rev/8ac2b8615368
branches:  trunk
changeset: 946429:8ac2b8615368
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Nov 27 16:42:00 2020 +0000

description:
Refine the documentation

Sort includes.
Correct the historical note, pipe first appeared in AT&T UNIX v3.
Document ENOMEM.

diffstat:

 lib/libc/sys/pipe.2 |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (59 lines):

diff -r 4d5f265ea17b -r 8ac2b8615368 lib/libc/sys/pipe.2
--- a/lib/libc/sys/pipe.2       Fri Nov 27 15:37:06 2020 +0000
+++ b/lib/libc/sys/pipe.2       Fri Nov 27 16:42:00 2020 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pipe.2,v 1.31 2017/10/25 17:44:50 abhinav Exp $
+.\"    $NetBSD: pipe.2,v 1.32 2020/11/27 16:42:00 kamil Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)pipe.2     8.1 (Berkeley) 6/4/93
 .\"
-.Dd January 23, 2012
+.Dd November 27, 2020
 .Dt PIPE 2
 .Os
 .Sh NAME
@@ -42,8 +42,8 @@
 .In unistd.h
 .Ft int
 .Fn pipe "int fildes[2]"
+.In fcntl.h
 .In unistd.h
-.In fcntl.h
 .Ft int
 .Fn pipe2 "int fildes[2]" "int flags"
 .Sh DESCRIPTION
@@ -59,7 +59,7 @@
 .Em read end
 of the pipe,
 and the second connects to the
-.Em write end  ,
+.Em write end ,
 so that data written to
 .Fa fildes[1]
 appears on (i.e., can be read from)
@@ -130,6 +130,8 @@
 Too many descriptors are active.
 .It Bq Er ENFILE
 The system file table is full.
+.It Bq Er ENOMEM
+Not enough kernel memory to establish a pipe.
 .El
 .Pp
 .Fn pipe2
@@ -154,7 +156,11 @@
 A
 .Fn pipe
 function call appeared in
-.At v6 .
+.At v3 .
+Since
+.At v4 ,
+it allocates two distinct file descriptors.
+.Pp
 The
 .Fn pipe2
 function is inspired from Linux and appeared in



Home | Main Index | Thread Index | Old Index