Commit Graph

41 Commits

Author SHA1 Message Date
Xin LI
b888b86e6f accept(2) may and can return EAGAIN, document it.
MFC after:	1 week
2014-10-10 03:05:55 +00:00
Jilles Tjoelker
b83686c8fe Add some missing .Nm for newer syscalls in existing man pages.
MFC after:	1 week
2014-01-11 22:00:16 +00:00
Jilles Tjoelker
0f49c96cfc accept(2): Update portability note for accept4().
The accept(2) man page warns that O_NONBLOCK and other properties on the
new socket may vary across implementations. However, this issue only
applies to accept() and not to accept4(). On the other hand, accept4()
is not commonly available yet.

Reported by:	pluknet
Reviewed by:	bjk
Approved by:	re (kib)
2013-10-01 21:17:18 +00:00
Jilles Tjoelker
ed5987bd08 accept(2), pipe(2): Fix .Dd. 2013-05-01 22:47:47 +00:00
Jilles Tjoelker
da7d2afb6d Add accept4() system call.
The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling the
non-blocking status on the new socket. (Note that the latter point means
that accept() is not equivalent to any form of accept4().)

The linuxulator's accept4 implementation leaves a race window where the new
file descriptor is not close-on-exec because it calls sys_accept(). This
implementation leaves no such race window (by using falloc() flags). The
linuxulator could be fixed and simplified by using the new code.

Like accept(), accept4() is async-signal-safe, a cancellation point and
permitted in capability mode.
2013-05-01 20:10:21 +00:00
Sergey Kandaurov
89bbe1496d Keep up with negative addrlen check removal in r249649. 2013-04-22 09:18:50 +00:00
Jilles Tjoelker
de9dcfba06 accept(2): Mention inheritance of O_ASYNC and signal destination.
While almost nobody uses O_ASYNC, and rightly so, the inheritance of the
related properties across accept() is a portability issue like the
inheritance of O_NONBLOCK.
2013-03-26 22:46:56 +00:00
Colin Percival
4054af4fb0 Attempt to reduce accidental foot-shooting by pointing out that
accept(2)ed sockets do not necessarily inherit O_NONBLOCK from
listening sockets on non-FreeBSD platforms.

Feet shot:	cperciva
MFC after:	1 month
2009-11-02 07:21:13 +00:00
Poul-Henning Kamp
20067a6892 Add Xr to getsockname(2) 2008-06-20 14:47:06 +00:00
Warner Losh
c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Giorgos Keramidas
e3446e1f8e Document the fact that accept(2) may return EINVAL when addrlen is
negative (in addition to returning EINVAL when called on a descriptor
that is not a socket).

Submitted by:	Arne H Juul <arnej@europe.yahoo-inc.com>
PR:		docs/80587
2005-05-04 11:09:26 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Bruce M Simpson
cb450d2233 Be specific about which socket properties are inherited from the original
socket upon accept(2).

PR:	docs/54995, kern/45733
2004-06-23 00:20:46 +00:00
Alfred Perlstein
7e2a61e17d Add restrict qualifiers. (docs)
PR: 44394
Submitted by: Craig Rodrigues <rodrige@attbi.com>
2003-12-24 18:52:41 +00:00
Peter Pentchev
8f4b894fbc Clarify that the second argument to accept() may be a null pointer if
no peer address information is desired.

PR:		56044
Submitted by:	Felix Opatz <felix@zotteljedi.de> and
		Bernd Luevelsmeyer <bdluevel@heitec.net>
MFC after:	1 month
2003-09-05 15:41:52 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
2faeeff4c9 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
Ruslan Ermilov
3d6cab6043 mdoc(7) police: sort xrefs. 2002-05-29 15:45:54 +00:00
Mike Silbersack
3a0b92ec0f Some updates to mention accept filters and how
listen queues work in a syncache world.

MFC after:	3 days
2002-05-08 18:19:01 +00:00
Dima Dorfman
cf1b88ff74 Nuke the paragraph that says "One can obtain user connection request
data without confirming the connection by issuing a recvmsg(2) [...]".
There's no such code in the kernel.

PR:		26861
Submitted by:	Richard A Steenbergen <ras@e-gerbil.net>,
		Tom Rhodes <darklogik@pittgoth.com>
2002-01-07 06:10:37 +00:00
Ruslan Ermilov
db8caf03e5 Remove the internal implementation details of wrapping syscalls,
which do not match the reality anyway.

Approved by:	deischen, bde
2001-10-26 17:38:20 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov
a307d59838 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Jimmy Olgeni
a68886ad51 Fix my ambiguous message about ECONNABORTED.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-02-25 23:56:41 +00:00
Jimmy Olgeni
ff08a1b858 Add ECONNABORTED to the ERRORS section. 2001-02-25 22:12:40 +00:00
Chris Costello
dca3f6825f Replace .Va references to function arguments to .Fa references. 2000-06-23 03:43:34 +00:00
Tim Vanderhoek
d4b81c98d8 Content-free commit: only remove trailing whitespace 2000-05-11 05:06:00 +00:00
Tim Vanderhoek
18bd6f9514 The accept() function is a call, not an argument. Also, add: serial
comma, missing-hyphen, and a word-erase character.
2000-05-11 05:04:30 +00:00
Alexey Zelkin
4f79a4117a Use `Er' variable to define first column width in ERRORS section. It was
initially suggested by mdoc(7) style, but was broken over the years
2000-05-04 13:09:25 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Poul-Henning Kamp
9b962c56a4 General clean-up of socket.h and associated sources to synchronise up
with NetBSD and the Single Unix Specification v2.

This updates some structures with other, almost equivalent types and
effort is under way to get the whole more consistent.

Also removes a double definition of INET6 and some other clean-ups.

Reviewed by: green, bde, phk
Some part obtained from: NetBSD, SUSv2 specification
1999-11-24 20:49:04 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Guy Helmer
275d1ee30b The accept(2) call can fail with EINTR (at least in the threaded context).
PR:		docs/8858
1999-04-29 20:32:54 +00:00
Jacques Vidrine
90d1ac3b67 Update to reflect reality.
PR:		kern/8629
1998-11-16 03:49:39 +00:00
Alexander Langer
fa70846939 Added EMFILE and ENFILE to errors section.
Obtained from:	OpenBSD
1998-01-11 17:07:20 +00:00
John-Mark Gurney
bb135fe9a1 add xrefs for getpeername, so other people that look for it can find it.. :) 1997-03-24 01:22:01 +00:00
Mike Pritchard
bf5a138ec4 Update a bunch of man pages to use .Fn instead
of .Nm when referencing funciton names.
1996-08-22 22:05:59 +00:00
Julian Elischer
f70177e76e Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00