summaryrefslogtreecommitdiff
path: root/lib/libc/sys/open.2
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-29 15:44:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-29 15:44:23 +0000
commit0337acda2730c848922c321b0174ad91dc36e267 (patch)
tree2b6125e8f567c2418869c4bc7fced291d9a2b324 /lib/libc/sys/open.2
parente0d88dccf159eb1b6ca31efd5fddfe994fa3bed7 (diff)
Move return value info into its own "RETURN VALUES" section.
Diffstat (limited to 'lib/libc/sys/open.2')
-rw-r--r--lib/libc/sys/open.217
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
index 54b5963bc07..56ef0d6f623 100644
--- a/lib/libc/sys/open.2
+++ b/lib/libc/sys/open.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: open.2,v 1.23 2001/08/05 21:08:06 hugh Exp $
+.\" $OpenBSD: open.2,v 1.24 2001/09/29 15:44:22 millert Exp $
.\" $NetBSD: open.2,v 1.8 1995/02/27 12:35:14 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -157,12 +157,10 @@ If creating a file with
the request for the lock will never fail
(provided that the underlying filesystem supports locking).
.Pp
-If successful,
+If
.Fn open
-returns a non-negative integer, termed a file descriptor.
-It returns \-1 on failure.
-The file pointer used to mark the current position within the
-file is set to the beginning of the file.
+is successful, the file pointer used to mark the current position within
+the file is set to the beginning of the file.
.Pp
When a new file is created it is given the group of the directory
which contains it.
@@ -178,6 +176,13 @@ The system imposes a limit on the number of file descriptors
open simultaneously by one process.
.Xr getdtablesize 3
returns the current system limit.
+.Sh RETURN VALUES
+If successful,
+.Fn open
+returns a non-negative integer, termed a file descriptor.
+Otherwise, a value of \-1 is returned and
+.Va errno
+is set to indicate the error.
.Sh ERRORS
The named file is opened unless:
.Bl -tag -width Er