Commit Graph

866 Commits

Author SHA1 Message Date
dds
58e19bb4ec Document an additional error return value. The connect(2) call can also
return EACCES on non-Unix domain sockets as demonstrated by the
following program:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int
main(int argc, char *argv[])
{
	struct sockaddr_in rem_addr;
	int sock;

	if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
		perror("socket");
		exit(1);
	}

	bzero((char *)&rem_addr, sizeof(rem_addr));
	rem_addr.sin_family = AF_INET;
	rem_addr.sin_addr.s_addr = INADDR_NONE;
	rem_addr.sin_port = htons(10000);

	if (connect(sock, (struct sockaddr *)&rem_addr,
sizeof(rem_addr)) < 0) {
		perror("connect");
		exit(1);
	}
}

The call chain returning this value is probably:

kern/uipc_syscalls.c:connect
kern/uipc_socket.c:soconnect
netinet/tcp_usrreq.c:tcp_usr_connect
netinet/tcp_output.c:tcp_output
netinet/ip_output.c:ip_output

Reviewed by:	schweikh (mentor)
MFC after:	2 weeks
2003-07-23 22:00:08 +00:00
ceri
2fe3c3880b Back out revision 1.22.
Requested by:	bde
2003-07-15 12:23:12 +00:00
ceri
7a5725f248 ioctl macros and defines are now present in ioccom.h, not ioctl.h.
Update the manpage to reflect this.

PR:		docs/54235
Submitted by:	Karen Thode <thode12@msn.com>
2003-07-13 21:02:48 +00:00
iedowse
a627a459f8 Add a new mount flag MNT_BYFSID that can be used to unmount a file
system by specifying the file system ID instead of a path. Use this
by default in umount(8). This avoids the need to perform any vnode
operations to look up the mount point, so it makes it possible to
unmount a file system whose root vnode cannot be looked up (e.g.
due to a dead NFS server, or a file system that has become detached
from the hierarchy because an underlying file system was unmounted).
It also provides an unambiguous way to specify which file system is
to be unmunted.

Since the ability to unmount using a path name is retained only for
compatibility, that case now just uses a simple string comparison
of the supplied path against f_mntonname of each mounted file system.

Discussed on:	freebsd-arch
mdoc help from:	ru
2003-07-01 17:40:23 +00:00
iedowse
3acfb762b5 Separate the description of the flags for mount(2) and unmount(2)
to clarify which system call accepts which arguments. Previously
the manual page gave the impression that calling unmount() with
flags of (MNT_FORCE | MNT_UPDATE | MNT_RDONLY) would downgrade a
read-write mount to read-only, which is clearly untrue; to do that,
these flags should be passed to mount() instead.
2003-06-30 22:22:12 +00:00
yar
af2693c2fb Correct a misspelled name of time_hi_and_version. 2003-06-27 13:41:29 +00:00
yar
c00d8c0364 Unify cross-references between sigpending(2), sigprocmask(2),
and sigsuspend(2), all three of which operate or depend on the
process signal mask.

Add a missing xref to sigsetops(3), without which the above three
syscalls would be useless.
2003-06-24 15:41:19 +00:00
imp
6731c07a2f Add clarifications about the information that ntp_gettime returns.
TAI is a timescale, just like UTC.  The tai field returns the offset
between the two, and isn't really used for precision time keeping.
Explain in brief what a positive and a negative leap seconds are.  Add
some URLs to very useful web pages about time and time keeping for
more information on using this API.

Reviewed by: phk
2003-06-21 20:27:54 +00:00
imp
933ec1e429 ntp_adjtime returns the current state of the clock (TIME_*) on success
or -1 on failure.  The manual used to say it returned 0 or -1.  Both
examination of the kernel sources, and ntpd show that this is the case.

MFC After: 3 days
2003-06-20 21:14:59 +00:00
sobomax
f5d77c1c33 Xref policy: exit(2) -> _exit(2). 2003-06-17 09:36:47 +00:00
trhodes
4ec977d5e5 Document ENOSPC.
PR:		52612
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2003-06-13 22:41:12 +00:00
charnier
948b0d8311 .Xr p1003_1b moved to .St -p1003.1b-93 2003-06-08 10:11:13 +00:00
charnier
9f754871d1 Add or correct section number in .Xr. Use .Vt or .Fn
instead of .Xr when needed
2003-06-08 10:01:52 +00:00
rwatson
9362735e45 Document the new explicit listing API for extended attributes; note
that the old API (passing "" as the attribute name to the _get_
interface) is now deprecated (and was probably a bad idea).

Pointed out by:	Dominic Giampaolo <dbg@apple.com>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-06-04 04:00:26 +00:00
hmp
98e8c5a828 Document that kldload(2) can also return EEXIST.
Approved by: des (mentor)
2003-06-03 12:29:34 +00:00
ru
34b4fc2567 Assorted mdoc(7) fixes. 2003-06-01 19:19:59 +00:00
ru
9bcac8799e Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
dougb
d12496de46 * The copy of the stat struct in the man page has rotted, so remove it.
Those who really need this information can find it in the include file.

* Include a succinct description of the st_birthtime field.

Approved by:	re (bmah)
2003-05-13 08:10:05 +00:00
robert
1e6c7486d5 Correct the return value of vfork(2) and rfork(2) in their
manual page function prototypes.
2003-04-27 21:01:34 +00:00
trhodes
9aba79052e Add a manual page for the ntp_gettime syscall.
Reviewed by:	ru, phk (older version).
2003-04-17 18:39:30 +00:00
trhodes
e148bdd15c Add a manual page for the ntp_adjtime syscall.
PR:		32674
Reviewed by:	phk, ru
2003-04-15 15:42:10 +00:00
mike
75859ca578 o In struct prison, add an allprison linked list of prisons (protected
by allprison_mtx), a unique prison/jail identifier field, two path
  fields (pr_path for reporting and pr_root vnode instance) to store
  the chroot() point of each jail.
o Add jail_attach(2) to allow a process to bind to an existing jail.
o Add change_root() to perform the chroot operation on a specified
  vnode.
o Generalize change_dir() to accept a vnode, and move namei() calls
  to callers of change_dir().
o Add a new sysctl (security.jail.list) which is a group of
  struct xprison instances that represent a snapshot of active jails.

Reviewed by:	rwatson, tjr
2003-04-09 02:55:18 +00:00
ceri
3c073571b3 [1] - Document EHOSTUNREACH as a possible error
[2]	- Remove a contraction

PR:		docs/50401
Submitted by:	[1] Slaven Rezic <slaven@rezic.de>
MFC after:	1 week
2003-04-01 20:25:46 +00:00
wes
ca1839cb91 Add a facility allowing processes to inform the VM subsystem they are
critical and should not be killed when pageout is looking for more
memory pages in all the wrong places.

Reviewed by:	arch@
Sponsored by:	St. Bernard Software
2003-03-31 21:09:57 +00:00
charnier
c0b518390e The .Fn function
The ... 2 system call
2003-03-24 16:07:19 +00:00
charnier
d0441d10b5 The .Fn function. Use .Xr where appropriate. 2003-03-24 16:05:24 +00:00
seanc
7ef05d02b9 Update sendfile.2 to include a TUNING section that documents the
various tunables that are applicable to sendfile(2).  Update tuning.7
to mention a reference to sendfile.2.

Approved by:	keramida
2003-03-12 09:28:44 +00:00
peter
243fd46542 Remove NS and ISO stuff. 2003-03-05 19:16:41 +00:00
julian
228305b591 Catch up with change to kse_release syscall.
The background info in this man page needs rewriting
in some parts since the last major changes
to the code, however it still accuratly reflects how to use the
API.
2003-02-25 09:49:46 +00:00
ru
0dea541567 mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
phk
7c7c0297c5 Mention CLOCK_MONOTONIC. 2003-02-23 10:20:23 +00:00
ru
8b5b8ec6a7 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
trhodes
a474b7abac Update errors.
PR:		48125
Submitted by:	Per Hedeland <per@hedeland.org> (original version)
2003-02-18 22:54:42 +00:00
nectar
832e8b7f9a Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.

Reviewed by:	/sbin/md5
2003-02-16 17:29:11 +00:00
charnier
a7cecc7301 Prevent uppercase after .Xr by adding ``The ... utility/system call''. 2003-02-05 13:36:13 +00:00
tjr
456ed0d014 Mention that the CLOCK_VIRTUAL and CLOCK_PROF clocks are not implemented.
PR:		8376
2003-02-05 09:17:32 +00:00
rwatson
ac892a9234 Document a bug in our chroot(2) implementation: if access control
checks, including the "open directory" check or a MAC check fail,
after the working directory of the process has been changed, then
the cwd of the process will be left as the target directory rather
than the original directory.

At some point, this bug might be fixable by performing the directory
change only after permission is granted for the change.  In the
mean time document it (it's been there for a while).
2003-01-31 21:19:22 +00:00
tjr
663bb01de6 Zap another reference to !RFPROC being unsupported that I missed before. 2003-01-31 08:59:00 +00:00
tjr
1be963ada3 Don't use -compact in list of available flags. Fix tag width. 2003-01-31 08:55:42 +00:00
tjr
4bf63206c8 !RFPROC has been supported for a while now. 2003-01-31 08:45:11 +00:00
alfred
28e8e60e36 Bring shm functions closer the the opengroup standards.
PR: 47469
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-25 21:33:05 +00:00
alfred
cea829ec35 Bring semop() closer the the opengroup standards.
PR: 47471
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-01-25 21:27:37 +00:00
maxim
67e1984f47 Remove EOL whitespaces. 2003-01-20 11:30:08 +00:00
maxim
81c42fccd4 o Fix a typo.
o Prepend a function name by .Fn macro.

Reviewed by:	archie
2003-01-20 11:28:41 +00:00
tmm
0e609c0eb3 Document that listen() can return EINVAL now. 2003-01-17 19:25:27 +00:00
tjr
7516bf2b45 Do a better job of documenting mincore(2), esp. the MINCORE_* flags. 2003-01-17 04:06:57 +00:00
tjr
fc5f7e9a8b Add the newly created semaphore to the named semaphore list in sem_open()
so that multiple opens of the same semaphore without an intervening
sem_close() return the same object, and so that sem_close() does not
segfault while trying to remove the item from the list.
2003-01-14 03:36:45 +00:00
tjr
2715581ca4 Including <time.h> before <aio.h> has not been necessary for a while now. 2003-01-14 02:37:06 +00:00
joerg
d0082e294c Mention the oddities and requirements for mount operations executed by
non-root users.

PR:		docs/42651
Submitted by:	Thomas Seck <tmseck@netcologne.de>
MFC after:	3 days
2003-01-13 19:42:21 +00:00
tjr
e47bfa0079 Refer to 1003.1 instead of 1003.2 in the Standards section. 2003-01-13 10:37:11 +00:00
mike
9a78589653 Fix struct iovec documentation to match reality.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2003-01-12 15:18:47 +00:00
tjr
727a92d7cb Add a manual page for the lio_listio() syscall. Still needs a bit
of polishing.
2003-01-12 09:28:16 +00:00
keramida
d8846eabc5 Typo fixes.
PR:		docs/46815
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2003-01-07 05:06:27 +00:00
trhodes
ef408d5a3a Remove redundant documenation.
PR:		46253
Submitted by:	Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
2003-01-06 23:20:55 +00:00
schweikh
d3367c5f5d Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
schweikh
fec6546e12 english(4) police. 2002-12-27 12:15:40 +00:00
julian
997c868ce3 Slight tuning if teh KSE man page to indicate some functionality is
not yet inplemented and to clear up some wording.
2002-12-27 08:21:15 +00:00
ru
f6006b0adb Spelling: s/then/than/ where appropriate. 2002-12-24 16:52:31 +00:00
ru
4979ab8d81 mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
trhodes
fccac15692 Document protection bits.
PR:		46252
Submitted by:	Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
2002-12-23 19:25:03 +00:00
ru
301b96498b Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
jmallett
785e008f9b Fix style (no space after return, twice-too-big continuation) and
cast (casting long to a void pointer, rather than intptr_t to a
void pointer) bogons.

Reviewed by:	bde
2002-12-22 03:20:16 +00:00
ceri
c32581acae Grammatical fixup: s/be the -1/be -1/
MFC after: 1 day
2002-12-19 21:48:43 +00:00
ru
51fe7c1a88 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
ru
3424a53ebe mdoc(7) police: Fixed a few .Fa abuses. 2002-12-19 09:33:34 +00:00
ru
863465c1ab mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
ru
a4b155d7a2 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
dillon
b43fb3e920 This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
40d653afff Fixed the parameter's name.
PR:		docs/46183
Submitted by:	Dirk Gouders <gouders@et.bocholt.fh-ge.de>
Approved by:	re
2002-12-11 14:04:37 +00:00
ru
3f859aa2ab mdoc(7) police: formatting nits.
Approved by:	re
2002-11-29 15:57:50 +00:00
archie
da5ffde8ea Describe newly added fields in the KSE and thread mailboxes.
Approved by:	re
2002-11-22 23:48:38 +00:00
ru
40e2359f4b libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
mike
6e674c0af0 Update SYNOPSIS to reflect the standardized header. Add STANDARDS
section.

PR:	43270
2002-11-17 16:34:07 +00:00
marcel
ad9b0af483 Given that we have 3 places to document UUID related information,
namely uuidgen(1), uuidgen(2) and uuid(3), the following division
has been choosen:
	uuidgen(1)	A description of the command line utility,
			and other user oriented UUID information.
	uuidgen(2)	A mostly technical description of UUIDs.
	uuid(3)		A description of the functions and other
			programmer oriented UUID information.

According to the division: add more technical contents.

Contributed by: Hiten Pandya <hiten@uk.FreeBSD.org>
Edited and enhanced: marcel
2002-11-11 00:29:01 +00:00
nsayer
67aa0a5dc4 After waiting for help with the markup, I finally decided to just patch
the page myself. The new language is more accurate than what was there
before, but the most accurate way of describing the funcionality eludes
me.

PR:		kern/33904
MFC after:	1 month
2002-11-04 19:30:04 +00:00
tjr
fba58b2ee8 Add descriptions for some _PC_* variables from <sys/unistd.h> that
were missing.
2002-11-04 07:21:44 +00:00
kbyanc
c70af01e80 Track the number of non-data chararacters stored in socket buffers so that
the data value returned by kevent()'s EVFILT_READ filter on non-TCP
sockets accurately reflects the amount of data that can be read from the
sockets by applications.

PR:		30634
Reviewed by:	-net, -arch
Sponsored by:	NTT Multimedia Communications Labs
MFC after:	2 weeks
2002-11-01 21:27:59 +00:00
rwatson
33b9bd2d6c While an interface can be depreciated, we prefer deprecated.
Submitted by:	Wayne Morrison <tewok@tislabs.com>
2002-10-29 20:53:46 +00:00
bde
23a4371e51 Restored sigaction's name in its prototype. 2002-10-24 13:03:46 +00:00
sheldonh
e53ce9a22f * Modernize aio(4), providing instructions for static and dynamic kernel
linking.

* Fix disorder in the SEE ALSO sections of aio_*(2).

* Remove unnecessary cross-references from the SEE ALSO sections of
  aio_*(2); config(8), kldload(8) and kldunload(8) are cross-referenced
  from aio(4).

* Remove the KERNEL OPTIONS sections from aio_*(2), now that these
  pages cross-reference aio(4), which contains suitable kernel linking
  reference material.
2002-10-24 12:57:05 +00:00
des
05e7d9747e Add cross-references to the aio(4) manual page.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-10-24 12:22:57 +00:00
alfred
4a01787436 Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2002-10-22 16:12:27 +00:00
schweikh
c554f3f243 Document that write(2) et al can return EROFS for attempts to write the
disk label area.

PR:		43891
Submitted by:	Diomidis D. Spinellis <dds@istlab.dmst.aueb.gr>
MFC after:	3 days
2002-10-10 19:16:10 +00:00
alfred
4c4e655234 de-__P() 2002-10-09 23:22:11 +00:00
rwatson
ce8274a36c Add brief mention of the extattr_*_link() system call variants.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-09 22:26:48 +00:00
archie
bdbdd1a6d4 Add note that there is a kernel-imposed limit on the number of threads
in a KSE group that may be simultaneously blocked in the kernel.
2002-10-08 22:42:42 +00:00
archie
503c2bfc5f Add MLINKS to kse.2. 2002-10-08 17:43:40 +00:00
mike
cf479e3516 Add restrict type-qualifier to sem_getvalue(). 2002-10-04 21:32:00 +00:00
robert
947e91552f Correct the regressive part of my last commit to these files:
use the .Fn macro instead of the .Fo ... .Fc combination to
format function prototypes.

Reminded by:	bde
2002-10-04 11:31:00 +00:00
archie
f43114e2a8 Add a man page for the KSE system calls.
Reviewed by:	julian, ru
2002-10-02 18:01:51 +00:00
robert
4ab3b5c0e7 Add the 'restrict' type qualifier to the prototypes of `sigaction',
`sigprocmask', `sigaltstack', and `sigwait' as well as to the
prototypes of the apparantly unimplemented functions `sigtimedwait'
and `sigwaitinfo'.  This complies with IEEE Std 1003.1-2001.
2002-10-02 10:53:44 +00:00
dd
187a6964e6 Remove the "special processes" section. It has rotted, and the idea
ceased to be useful when the number of "special processes" went from 3
to one per device.  I considered replacing it with a "kernel threads"
section, but this seemed like the wrong place for that.

PR:		40969
2002-10-02 00:09:24 +00:00
dd
552aeba29f Don't claim to return the fileid which we unloaded. The kernel
doesn't do this, and it wouldn't be very useful if it did, since the
caller supplies us with that number.

PR:		41329
Submitted by:	Michael Galassi <nerd@xyz.com>
2002-10-01 23:53:51 +00:00
mike
3df40ef438 <sys/types.h> is no longer needed. 2002-09-25 16:49:09 +00:00
alfred
d5e93c10ec Welcome the sem_ API to libc! 2002-09-19 01:14:08 +00:00
archie
57de4fb945 Update to reflect reality.
Reviewed by:	mini
MFC after:	3 days
2002-09-11 21:40:02 +00:00
archie
02e28a1d0c Adjust to reflect reality, which is that sigaltstack() takes stack_t *'s.
MFC after:	3 days
2002-09-10 21:06:51 +00:00
mike
3b412a9b84 Note that <sys/types.h> in no longer a prerequisite for <utime.h> and
<sys/mman.h>.
2002-08-24 00:39:43 +00:00
phk
34ae8fe537 s/EDOFUS/EDOOFUS/
Persuaded by:	Google
2002-08-21 17:11:00 +00:00