From: Ben Gras Date: Fri, 1 Jul 2005 17:57:51 +0000 (+0000) Subject: Small select manpage update. X-Git-Tag: v3.1.0~658 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doxygen.log?a=commitdiff_plain;h=bfc8f08ae784c06dc78f531d92d110f7f1087fc3;p=minix.git Small select manpage update. manpages for sync and getpriority/setpriority system calls. manpage for nice utility. --- diff --git a/man/man1/nice.1 b/man/man1/nice.1 new file mode 100644 index 000000000..0a11c185f --- /dev/null +++ b/man/man1/nice.1 @@ -0,0 +1,26 @@ +.TH NICE 1 +.SH NAME +nice \- invoke command with higher or lower scheduling priority +.SH SYNOPSIS +\fBnice\fP [\fB\-n\fP increment] \fIutility\fP [\fIargument\fP...] +.SH DESCRIPTION +The +.B nice +utility runs \fIutility\fP at a different scheduling priority than +the default. The nicer the process is to others (the higher the +increment), the less favourable the scheduling is. Super-users +can give a negative increment, meaning scheduling is more favourable +than the default. +.SH OPTIONS +.TP +.B \-n \fIincrement +the increment value sets how nice the invoked command will be. 0 is +the same priority as regular processes. 10 is the default. +The range is -20 to 20. +.SH SEE ALSO +getpriority(2), setpriority(2) +.SH AUTHOR +This +.B nice +utility was imported from FreeBSD. This manual page was written +Ben Gras . diff --git a/man/man2/getpriority.2 b/man/man2/getpriority.2 new file mode 100644 index 000000000..d0ac11528 --- /dev/null +++ b/man/man2/getpriority.2 @@ -0,0 +1,37 @@ +.TH GETPRIORITY 2 "Jul 1, 2005" +.UC 4 +.SH NAME +getpriority, setpriority \- get and set scheduling priority +.SH SYNOPSIS +.nf +.ft B +#include + +int getpriority(int \fIwhich\fP, int \fIwho\fP) +int setpriority(int \fIwhich\fP, int \fIwho\fP, int \fIprio\fP) +.SH DESCRIPTION +.B Getpriority +returns the scheduling priority of the process, process group, or user +referred to in \fIwho\fP. Which of the three is indicated in +\fIwhich\fP, by PRIO_PROCESS, PRIO_PGRP and PRIO_USER, respectively. +In Minix, currently only PRIO_PROCESS is implemented. + +The range of the returned value is between PRIO_MIN and PRIO_MAX, +currently between -20 and 20, and is the so-called nice value of +a process. The higher the nice value, the less favourable the scheduling +priority. + +.B Setpriority +sets the priority indicated by \fIwho\fP and \fIwhich\fP to \fIprio\fP. +\fIprio\fP, which is the nice value, may only be lowered by the super-user. +.SH RETURN VALUES +These functions both return -1 on failure, and set errno in this case. +Because +.B getpriority +can return -1 as the real nice value, the caller has to reset errno +and check errno afterwards to distinguish between an error condition +and a negative nice value. +.SH SEE ALSO +nice(1) +.SH AUTHOR +Ben Gras diff --git a/man/man2/select.2 b/man/man2/select.2 index 32cbc7e60..bf983bee9 100644 --- a/man/man2/select.2 +++ b/man/man2/select.2 @@ -27,7 +27,7 @@ up to and including file descriptor , for reading, writing, or exceptional conditions, respectively. .B Select currently supports regular files, pipes, named pipes, -and tty file descriptors. Inet and pty fd's still to be done. +inet, and tty file descriptors. Pty fd's still to be done. If the .I readfds diff --git a/man/man2/sync.2 b/man/man2/sync.2 index c769d69b5..817845423 100644 --- a/man/man2/sync.2 +++ b/man/man2/sync.2 @@ -7,13 +7,14 @@ .TH SYNC 2 "June 30, 1985" .UC 4 .SH NAME -sync \- update super-block +sync, fsync \- update dirty buffers and super-block .SH SYNOPSIS .nf .ft B #include int sync(void) +int fsync(fd) .ft R .fi .SH DESCRIPTION @@ -22,6 +23,10 @@ causes all information in the file system buffers that should be on disk to be written out. This includes modified super blocks, modified i-nodes, and delayed block I/O. +.B +Fsync +does the same thing, but only for the blocks associated with a specific +file descriptor. Under minix, currently the two calls do the same thing. .SH "SEE ALSO" .BR reboot (2), .BR sync (8).