mirror of https://github.com/mkerrisk/man-pages
_syscall.2, capget.2, ioprio_set.2, semop.2, send.2, ctime.3, dysize.3, fenv.3, fmtmsg.3, ftok.3, ftw.3, getaddrinfo.3, getgrent_r.3, gethostbyname.3, getopt.3, getpw.3, getpwent_r.3, getsubopt.3, getutent.3, glob.3, if_nameindex.3, inet.3, lseek64.3, malloc_hook.3, mbrtowc.3, mkstemp.3, mq_receive.3, mq_send.3, posix_spawn.3, putgrent.3, putpwent.3, qsort.3, raise.3, rand.3, rtime.3, setaliasent.3, setbuf.3, shm_open.3, significand.3, sigqueue.3, statvfs.3, strfromd.3, strptime.3, strtol.3, strtoul.3, termios.3, tgamma.3, timeradd.3, tsearch.3, tzset.3, updwtmp.3, usleep.3, wcstok.3, console_codes.4, hd.4, hpsa.4, mem.4, null.4, ram.4, sd.4, ttyS.4, filesystems.5, group.5, passwd.5, shells.5, termcap.5, ttytype.5, tzfile.5, utmp.5, ascii.7, bootparam.7, complex.7, cpuset.7, epoll.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
ba39b288ab
commit
bdd915e20f
|
@ -50,10 +50,12 @@ You need to know how many arguments, their types,
|
|||
and the function return type.
|
||||
There are seven macros that make the actual call into the system easier.
|
||||
They have the form:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.RI _syscall X ( type , name , type1 , arg1 , type2 , arg2 ,...)
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
where
|
||||
.IP
|
||||
|
|
|
@ -83,7 +83,7 @@ typedef struct __user_cap_data_struct {
|
|||
__u32 inheritable;
|
||||
} *cap_user_data_t;
|
||||
.EE
|
||||
.in -4n
|
||||
.in
|
||||
.PP
|
||||
The
|
||||
.IR effective ,
|
||||
|
|
|
@ -248,14 +248,14 @@ One can view the current I/O scheduler via the
|
|||
filesystem.
|
||||
For example, the following command
|
||||
displays a list of all schedulers currently loaded in the kernel:
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.RB "$" " cat /sys/block/sda/queue/scheduler"
|
||||
noop anticipatory deadline [cfq]
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The scheduler surrounded by brackets is the one actually
|
||||
in use for the device
|
||||
.RI ( sda
|
||||
|
@ -267,14 +267,15 @@ scheduler for the
|
|||
.I sda
|
||||
device to
|
||||
.IR cfq :
|
||||
.sp
|
||||
.RS
|
||||
.nf
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.RB "$" " su"
|
||||
Password:
|
||||
.RB "#" " echo cfq > /sys/block/sda/queue/scheduler"
|
||||
.fi
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.\"
|
||||
.SS The Completely Fair Queuing (CFQ) I/O scheduler
|
||||
Since version 3 (also known as CFQ Time Sliced), CFQ implements
|
||||
I/O nice levels similar to those
|
||||
|
|
|
@ -57,17 +57,16 @@ _GNU_SOURCE
|
|||
.SH DESCRIPTION
|
||||
Each semaphore in a System\ V semaphore set
|
||||
has the following associated values:
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
unsigned short semval; /* semaphore value */
|
||||
unsigned short semzcnt; /* # waiting for zero */
|
||||
unsigned short semncnt; /* # waiting for increase */
|
||||
pid_t sempid; /* PID of process that last
|
||||
modified semaphore value */
|
||||
.sp
|
||||
.in -4n
|
||||
.fi
|
||||
.PP
|
||||
.BR semop ()
|
||||
performs operations on selected semaphores in the set indicated by
|
||||
.IR semid .
|
||||
|
@ -86,7 +85,7 @@ containing the following members:
|
|||
unsigned short sem_num; /* semaphore number */
|
||||
short sem_op; /* semaphore operation */
|
||||
short sem_flg; /* operation flags */
|
||||
.in -4n
|
||||
.in
|
||||
.fi
|
||||
.PP
|
||||
Flags recognized in
|
||||
|
|
|
@ -328,7 +328,7 @@ or search permission is denied for one of the directories
|
|||
the path prefix.
|
||||
(See
|
||||
.BR path_resolution (7).)
|
||||
.sp
|
||||
.IP
|
||||
(For UDP sockets) An attempt was made to send to a
|
||||
network/broadcast address as though it was a unicast address.
|
||||
.TP
|
||||
|
|
|
@ -414,7 +414,6 @@ The glibc version of \fIstruct tm\fP has additional fields
|
|||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.sp
|
||||
const char *tm_zone; /* Timezone abbreviation */
|
||||
.EE
|
||||
.in
|
||||
|
|
|
@ -44,9 +44,13 @@ Feature Test Macro Requirements for glibc (see
|
|||
.SH DESCRIPTION
|
||||
The function returns 365 for a normal year and 366 for a leap year.
|
||||
The calculation for leap year is based on:
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The formula is defined in the macro
|
||||
.I __isleap(year)
|
||||
also found in
|
||||
|
|
10
man3/fenv.3
10
man3/fenv.3
|
@ -315,20 +315,18 @@ and
|
|||
to set individual floating-point traps, and
|
||||
.BR fegetexcept ()
|
||||
to query the state.
|
||||
.sp
|
||||
.PP
|
||||
.nf
|
||||
.EX
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.br
|
||||
.B "#include <fenv.h>"
|
||||
.sp
|
||||
.BI "int feenableexcept(int " excepts );
|
||||
.br
|
||||
.BI "int fedisableexcept(int " excepts );
|
||||
.br
|
||||
.B "int fegetexcept(void);"
|
||||
.br
|
||||
.EE
|
||||
.fi
|
||||
.LP
|
||||
.PP
|
||||
The
|
||||
.BR feenableexcept ()
|
||||
and
|
||||
|
|
|
@ -80,8 +80,7 @@ is a synonym for
|
|||
The
|
||||
.I classification
|
||||
argument is the sum of values describing 4 types of information.
|
||||
.br
|
||||
.sp
|
||||
.PP
|
||||
The first value defines the output channel.
|
||||
.TP 12n
|
||||
.B MM_PRINT
|
||||
|
@ -187,19 +186,19 @@ print nothing.
|
|||
If the user puts
|
||||
.B SEV_LEVEL
|
||||
with a format like
|
||||
.sp
|
||||
.PP
|
||||
.RS
|
||||
SEV_LEVEL=[description[:description[:...]]]
|
||||
.RE
|
||||
.sp
|
||||
.PP
|
||||
in the environment of the process before the first call to
|
||||
.BR fmtmsg (),
|
||||
where each description is of the form
|
||||
.sp
|
||||
.PP
|
||||
.RS
|
||||
severity-keyword,level,printstring
|
||||
.RE
|
||||
.sp
|
||||
.PP
|
||||
then
|
||||
.BR fmtmsg ()
|
||||
will also accept the indicated values for the level (in addition to
|
||||
|
|
|
@ -83,10 +83,12 @@ T} Thread safety MT-Safe
|
|||
POSIX.1-2001, POSIX.1-2008.
|
||||
.SH NOTES
|
||||
On some ancient systems, the prototype was:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.BI "key_t ftok(char *" pathname ", char " proj_id );
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
Today,
|
||||
.I proj_id
|
||||
|
|
|
@ -311,7 +311,7 @@ If set, stay within the same filesystem
|
|||
If set, do not follow symbolic links.
|
||||
(This is what you want.)
|
||||
If not set, symbolic links are followed, but no file is reported twice.
|
||||
.sp
|
||||
.IP
|
||||
If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set,
|
||||
then the function
|
||||
.IR fn ()
|
||||
|
|
|
@ -116,8 +116,8 @@ struct addrinfo {
|
|||
char *ai_canonname;
|
||||
struct addrinfo *ai_next;
|
||||
};
|
||||
.fi
|
||||
.in
|
||||
.fi
|
||||
.PP
|
||||
The
|
||||
.I hints
|
||||
|
|
|
@ -151,28 +151,28 @@ the POSIX version of functions like
|
|||
.BR getpwnam_r (3).
|
||||
Other systems use the prototype
|
||||
.sp
|
||||
.nf
|
||||
.in +4n
|
||||
.nf
|
||||
struct group *getgrent_r(struct group *grp, char *buf,
|
||||
int buflen);
|
||||
.in
|
||||
.fi
|
||||
.in
|
||||
.sp
|
||||
or, better,
|
||||
.sp
|
||||
.nf
|
||||
.in +4n
|
||||
.nf
|
||||
int getgrent_r(struct group *grp, char *buf, int buflen,
|
||||
FILE **gr_fp);
|
||||
.in
|
||||
.fi
|
||||
.in
|
||||
.SH NOTES
|
||||
The function
|
||||
.BR getgrent_r ()
|
||||
is not really reentrant since it shares the reading position
|
||||
in the stream with all other threads.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
.EX
|
||||
#define _GNU_SOURCE
|
||||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
|
@ -202,7 +202,7 @@ main(void)
|
|||
endgrent();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.\" perhaps add error checking - should use strerror_r
|
||||
.\" #include <errno.h>
|
||||
.\" #include <stdlib.h>
|
||||
|
|
|
@ -261,7 +261,6 @@ The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
|
|||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.ne 7
|
||||
struct hostent {
|
||||
char *h_name; /* official name of host */
|
||||
char **h_aliases; /* alias list */
|
||||
|
|
|
@ -227,9 +227,9 @@ is a pointer to the first element of an array of
|
|||
declared in
|
||||
.I <getopt.h>
|
||||
as
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.sp
|
||||
struct option {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
|
@ -402,8 +402,8 @@ to handle two program options:
|
|||
with no associated value; and
|
||||
.IR "\-t val" ,
|
||||
which expects an associated value.
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.EX
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -447,13 +447,13 @@ main(int argc, char *argv[])
|
|||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EX
|
||||
.SS getopt_long()
|
||||
The following example program illustrates the use of
|
||||
.BR getopt_long ()
|
||||
with most of its features.
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.EE
|
||||
#include <stdio.h> /* for printf */
|
||||
#include <stdlib.h> /* for exit */
|
||||
#include <getopt.h>
|
||||
|
@ -532,7 +532,7 @@ main(int argc, char **argv)
|
|||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR getopt (1),
|
||||
.BR getsubopt (3)
|
||||
|
|
|
@ -46,10 +46,12 @@ The
|
|||
function reconstructs the password line entry for
|
||||
the given user ID \fIuid\fP in the buffer \fIbuf\fP.
|
||||
The returned buffer contains a line of format
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EE
|
||||
.B name:passwd:uid:gid:gecos:dir:shell
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
||||
.sp
|
||||
|
|
|
@ -153,12 +153,12 @@ the POSIX version of functions like
|
|||
.BR getpwnam_r (3).
|
||||
Other systems use the prototype
|
||||
.sp
|
||||
.nf
|
||||
.in +4n
|
||||
.nf
|
||||
struct passwd *
|
||||
getpwent_r(struct passwd *pwd, char *buf, int buflen);
|
||||
.in
|
||||
.fi
|
||||
.in
|
||||
.sp
|
||||
or, better,
|
||||
.sp
|
||||
|
@ -175,7 +175,7 @@ The function
|
|||
is not really reentrant since it shares the reading position
|
||||
in the stream with all other threads.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
.EX
|
||||
#define _GNU_SOURCE
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
|
@ -199,7 +199,7 @@ main(void)
|
|||
endpwent();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.\" perhaps add error checking - should use strerror_r
|
||||
.\" #include <errno.h>
|
||||
.\" #include <stdlib.h>
|
||||
|
|
|
@ -61,9 +61,11 @@ which is separated from the suboption name by an equal sign.
|
|||
The following is an example of the kind of string
|
||||
that might be passed in
|
||||
.IR optionp :
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.B ro,name=xyz
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The
|
||||
|
|
|
@ -225,20 +225,19 @@ with the prototype given above for
|
|||
All these functions are obsolete now on non-Linux systems.
|
||||
POSIX.1-2001 and POSIX.1-2008, following SUSv1,
|
||||
does not have any of these functions, but instead uses
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.B #include <utmpx.h>
|
||||
.sp
|
||||
.PP
|
||||
.B struct utmpx *getutxent(void);
|
||||
.br
|
||||
.B struct utmpx *getutxid(const struct utmpx *);
|
||||
.br
|
||||
.B struct utmpx *getutxline(const struct utmpx *);
|
||||
.br
|
||||
.B struct utmpx *pututxline(const struct utmpx *);
|
||||
.br
|
||||
.B void setutxent(void);
|
||||
.br
|
||||
.B void endutxent(void);
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
These functions are provided by glibc,
|
||||
and perform the same task as their equivalents without the "x", but use
|
||||
|
@ -268,20 +267,21 @@ is an alias for
|
|||
.SS Glibc notes
|
||||
The above functions are not thread-safe.
|
||||
Glibc adds reentrant versions
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.B #include <utmp.h>
|
||||
.sp
|
||||
.PP
|
||||
.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||
.sp
|
||||
.PP
|
||||
.BI "int getutid_r(struct utmp *" ut ,
|
||||
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||
.sp
|
||||
.PP
|
||||
.BI "int getutline_r(struct utmp *" ut ,
|
||||
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );
|
||||
.fi
|
||||
.sp
|
||||
.in -4n
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
Feature Test Macro Requirements for glibc (see
|
||||
.BR feature_test_macros (7)):
|
||||
.in
|
||||
|
|
|
@ -333,7 +333,9 @@ These will store their error code in
|
|||
One example of use is the following code, which simulates typing
|
||||
.sp
|
||||
.in +4n
|
||||
.EX
|
||||
ls \-l *.c ../*.c
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
in the shell:
|
||||
|
|
|
@ -45,10 +45,10 @@ The
|
|||
structure contains at least the following entries:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
unsigned int if_index; /* Index of interface (1, 2, ...) */
|
||||
char *if_name; /* Null-terminated name ("eth0", etc.) */
|
||||
.fi
|
||||
.EX
|
||||
unsigned int if_index; /* Index of interface (1, 2, ...) */
|
||||
char *if_name; /* Null-terminated name ("eth0", etc.) */
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The
|
||||
|
|
|
@ -212,13 +212,13 @@ is defined in
|
|||
as:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
typedef uint32_t in_addr_t;
|
||||
|
||||
struct in_addr {
|
||||
in_addr_t s_addr;
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SH ATTRIBUTES
|
||||
For an explanation of the terms used in this section, see
|
||||
|
|
|
@ -62,35 +62,35 @@ and
|
|||
.BR _llseek (2).
|
||||
.SS lseek()
|
||||
Prototype:
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
|
||||
.EE
|
||||
.in
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
.BR lseek (2)
|
||||
uses the type
|
||||
.IR off_t .
|
||||
This is a 32-bit signed type on 32-bit architectures, unless one
|
||||
compiles with
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
in which case it is a 64-bit signed type.
|
||||
.SS lseek64()
|
||||
Prototype:
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence );
|
||||
.EE
|
||||
.in
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
The library routine
|
||||
.BR lseek64 ()
|
||||
uses a 64-bit type even when
|
||||
|
@ -99,13 +99,13 @@ is a 32-bit type.
|
|||
Its prototype (and the type
|
||||
.IR off64_t )
|
||||
is available only when one compiles with
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
#define _LARGEFILE64_SOURCE
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
The function
|
||||
.BR lseek64 ()
|
||||
.\" in glibc 2.0.94, not in 2.0.6
|
||||
|
@ -113,13 +113,13 @@ is available since glibc 2.1, and is defined to be an alias for
|
|||
.BR llseek ().
|
||||
.SS llseek()
|
||||
Prototype:
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence );
|
||||
.EE
|
||||
.in
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
The type
|
||||
.I loff_t
|
||||
is a 64-bit signed type.
|
||||
|
@ -133,25 +133,25 @@ the above prototype, or something equivalent, to their own source.
|
|||
When users complained about data loss caused by a miscompilation of
|
||||
.BR e2fsck (8),
|
||||
glibc 2.1.3 added the link-time warning
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
"the \`llseek\' function may be dangerous; use \`lseek64\' instead."
|
||||
.in
|
||||
.sp
|
||||
.PP
|
||||
This makes this function unusable if one desires a warning-free
|
||||
compilation.
|
||||
.SS _llseek()
|
||||
On 32-bit architectures,
|
||||
this is the system call that is used to implement all of the above functions.
|
||||
The prototype is:
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo ,
|
||||
.BI " loff_t *" result ", int " whence );
|
||||
.EE
|
||||
.in
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
For more details, see
|
||||
.BR llseek (2).
|
||||
.PP
|
||||
|
|
|
@ -91,8 +91,8 @@ Programmers should instead preempt calls to the relevant functions
|
|||
by defining and exporting functions such as "malloc" and "free".
|
||||
.SH EXAMPLE
|
||||
Here is a short example of how to use these variables.
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
|
||||
|
@ -136,7 +136,7 @@ my_malloc_hook(size_t size, const void *caller)
|
|||
|
||||
return result;
|
||||
}
|
||||
.fi
|
||||
.EX
|
||||
.SH SEE ALSO
|
||||
.BR mallinfo (3),
|
||||
.BR malloc (3),
|
||||
|
|
|
@ -143,9 +143,11 @@ object
|
|||
.I a
|
||||
can be initialized to the initial state
|
||||
by zeroing it, for example using
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EE
|
||||
memset(&a, 0, sizeof(a));
|
||||
.EE
|
||||
.in
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
|
|
|
@ -172,7 +172,7 @@ and
|
|||
.BR mkostemp ():
|
||||
The last six characters of \fItemplate\fP were not XXXXXX;
|
||||
now \fItemplate\fP is unchanged.
|
||||
.sp
|
||||
.IP
|
||||
For
|
||||
.BR mkstemps ()
|
||||
and
|
||||
|
|
|
@ -102,9 +102,9 @@ struct timespec {
|
|||
time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
.fi
|
||||
.in
|
||||
.PP
|
||||
If no message is available,
|
||||
and the timeout has already expired by the time of the call,
|
||||
.BR mq_timedreceive ()
|
||||
|
|
|
@ -104,16 +104,16 @@ points to a structure which specifies how long the call will block.
|
|||
This value is an absolute timeout in seconds and nanoseconds
|
||||
since the Epoch, 1970-01-01 00:00:00 +0000 (UTC),
|
||||
specified in the following structure:
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
struct timespec {
|
||||
time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
.fi
|
||||
.in
|
||||
.PP
|
||||
If the message queue is full,
|
||||
and the timeout has already expired by the time of the call,
|
||||
.BR mq_timedsend ()
|
||||
|
|
|
@ -576,16 +576,16 @@ In the first run, the
|
|||
command is executed in the child, and the
|
||||
.BR posix_spawn ()
|
||||
call employs no file actions or attributes objects.
|
||||
.sp
|
||||
.PP
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
$ \fB./a.out date\fP
|
||||
PID of child: 7634
|
||||
Tue Feb 1 19:47:50 CEST 2011
|
||||
Child status: exited, status=0
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.PP
|
||||
In the next run, the
|
||||
.I \-c
|
||||
command-line option is used to create a file actions object that closes
|
||||
|
@ -593,16 +593,16 @@ standard output in the child.
|
|||
Consequently,
|
||||
.BR date (1)
|
||||
fails when trying to perform output and exits with a status of 1.
|
||||
.sp
|
||||
.PP
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
$ \fB./a.out -c date\fP
|
||||
PID of child: 7636
|
||||
date: write error: Bad file descriptor
|
||||
Child status: exited, status=1
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.PP
|
||||
In the next run, the
|
||||
.I \-s
|
||||
command-line option is used to create an attributes object that
|
||||
|
@ -617,9 +617,9 @@ Therefore, to kill the child,
|
|||
is necessary
|
||||
.RB ( SIGKILL
|
||||
can't be blocked).
|
||||
.sp
|
||||
.PP
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
$ \fB./a.out -s sleep 60 &\fP
|
||||
[1] 7637
|
||||
$ PID of child: 7638
|
||||
|
@ -628,19 +628,19 @@ $ \fBkill 7638\fP
|
|||
$ \fBkill -KILL 7638\fP
|
||||
$ Child status: killed by signal 9
|
||||
[1]+ Done ./a.out -s sleep 60
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.PP
|
||||
When we try to execute a nonexistent command in the child, the
|
||||
.BR exec (3)
|
||||
fails and the child exits with a status of 127.
|
||||
.sp
|
||||
.PP
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
$ \fB./a.out xxxxx
|
||||
PID of child: 10190
|
||||
Child status: exited, status=127
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SS Program source
|
||||
.EX
|
||||
|
|
|
@ -29,14 +29,14 @@ The
|
|||
is defined as follows:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
struct group {
|
||||
char *gr_name; /* group name */
|
||||
char *gr_passwd; /* group password */
|
||||
gid_t gr_gid; /* group ID */
|
||||
char **gr_mem; /* group members */
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SH RETURN VALUE
|
||||
The function returns zero on success, and a nonzero value on error.
|
||||
|
|
|
@ -58,7 +58,7 @@ structure \fIp\fP in the file associated with \fIstream\fP.
|
|||
The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
struct passwd {
|
||||
char *pw_name; /* username */
|
||||
char *pw_passwd; /* user password */
|
||||
|
@ -68,7 +68,7 @@ struct passwd {
|
|||
char *pw_dir; /* home directory */
|
||||
char *pw_shell; /* shell program */
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SH RETURN VALUE
|
||||
The
|
||||
|
|
|
@ -124,8 +124,8 @@ For one example of use, see the example under
|
|||
.PP
|
||||
Another example is the following program,
|
||||
which sorts the strings given in its command-line arguments:
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -156,7 +156,7 @@ main(int argc, char *argv[])
|
|||
puts(argv[j]);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR sort (1),
|
||||
.BR alphasort (3),
|
||||
|
|
12
man3/raise.3
12
man3/raise.3
|
@ -40,19 +40,19 @@ The
|
|||
.BR raise ()
|
||||
function sends a signal to the calling process or thread.
|
||||
In a single-threaded program it is equivalent to
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
kill(getpid(), sig);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
In a multithreaded program it is equivalent to
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
pthread_kill(pthread_self(), sig);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
If the signal causes a handler to be called,
|
||||
|
|
10
man3/rand.3
10
man3/rand.3
|
@ -185,7 +185,7 @@ and
|
|||
possibly useful when one needs the same sequence on two different machines.
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
static unsigned long next = 1;
|
||||
|
||||
/* RAND_MAX assumed to be 32767 */
|
||||
|
@ -197,16 +197,16 @@ int myrand(void) {
|
|||
void mysrand(unsigned int seed) {
|
||||
next = seed;
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The following program can be used to display the
|
||||
pseudo-random sequence produced by
|
||||
.BR rand ()
|
||||
when given a particular seed.
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -232,7 +232,7 @@ main(int argc, char *argv[])
|
|||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EX
|
||||
.in
|
||||
.SH SEE ALSO
|
||||
.BR drand48 (3),
|
||||
|
|
|
@ -99,8 +99,8 @@ is not commented out.
|
|||
The program connects to a computer called "linux".
|
||||
Using "localhost" does not work.
|
||||
The result is the localtime of the computer "linux".
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
@ -136,7 +136,7 @@ main(void)
|
|||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.\" .BR netdate (1),
|
||||
.BR ntpdate (1),
|
||||
|
|
|
@ -137,8 +137,8 @@ alias_ent *alias_getbyname(char *name);
|
|||
The following example compiles with
|
||||
.IR "gcc example.c \-o example" .
|
||||
It will dump all names in the alias database.
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
#include <aliases.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -162,7 +162,7 @@ main(void)
|
|||
endaliasent();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR getgrent (3),
|
||||
.BR getpwent (3),
|
||||
|
|
|
@ -201,8 +201,8 @@ points to still exists by the time
|
|||
.I stream
|
||||
is closed, which also happens at program termination.
|
||||
For example, the following is invalid:
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.EX
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
|
@ -213,7 +213,7 @@ main(void)
|
|||
printf("Hello, world!\\n");
|
||||
return 0;
|
||||
}
|
||||
.fi
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
.BR stdbuf (1),
|
||||
.BR fclose (3),
|
||||
|
|
|
@ -109,7 +109,7 @@ is listed in
|
|||
.BR open (2).
|
||||
(Symbolic definitions of these constants can be obtained by including
|
||||
.IR <sys/stat.h> .)
|
||||
.sp
|
||||
.IP
|
||||
A new shared memory object initially has zero length\(emthe size of the
|
||||
object can be set using
|
||||
.BR ftruncate (2).
|
||||
|
|
|
@ -40,9 +40,11 @@ These functions return the mantissa of
|
|||
.I x
|
||||
scaled to the range [1,2).
|
||||
They are equivalent to
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
scalb(x, (double) \-ilogb(x))
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
This function exists mainly for use in certain standardized tests
|
||||
|
|
|
@ -59,12 +59,12 @@ argument is used to specify an accompanying item of data (either an integer
|
|||
or a pointer value) to be sent with the signal, and has the following type:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
union sigval {
|
||||
int sival_int;
|
||||
void *sival_ptr;
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
If the receiving process has installed a handler for this signal using the
|
||||
|
|
|
@ -236,13 +236,15 @@ function will use information from that field rather than scanning
|
|||
.IR /proc/mounts .
|
||||
.PP
|
||||
The glibc implementations of
|
||||
.sp
|
||||
.nf
|
||||
pathconf(path, _PC_REC_XFER_ALIGN);
|
||||
pathconf(path, _PC_ALLOC_SIZE_MIN);
|
||||
pathconf(path, _PC_REC_MIN_XFER_SIZE);
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
pathconf(path, _PC_REC_XFER_ALIGN);
|
||||
pathconf(path, _PC_ALLOC_SIZE_MIN);
|
||||
pathconf(path, _PC_REC_MIN_XFER_SIZE);
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
respectively use the
|
||||
.IR f_frsize ,
|
||||
.IR f_frsize ,
|
||||
|
|
|
@ -84,7 +84,11 @@ and
|
|||
.BR strfroml ()
|
||||
functions are equivalent to
|
||||
.PP
|
||||
snprintf(str, n, format, fp);
|
||||
.in +4n
|
||||
.EX
|
||||
snprintf(str, n, format, fp);
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
except for the
|
||||
.I format
|
||||
|
@ -189,7 +193,7 @@ T} Thread safety MT-Safe locale
|
|||
\^ Asynchronous signal safety AS-Unsafe heap
|
||||
\^ Asynchronous cancellation safety AC-Unsafe mem
|
||||
.TE
|
||||
.sp
|
||||
.sp 1
|
||||
Note: these attributes are preliminary.
|
||||
.SH CONFORMING TO
|
||||
C99, ISO/IEC TS 18661-1.
|
||||
|
@ -207,39 +211,39 @@ To convert the value 12.1 as a float type to a string using decimal
|
|||
notation, resulting in "12.100000":
|
||||
.sp
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#include <stdlib.h>
|
||||
int ssize = 10;
|
||||
char s[ssize];
|
||||
strfromf(s, ssize, "%f", 12.1);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
To convert the value 12.3456 as a float type to a string using
|
||||
decimal notation with two digits of precision, resulting in "12.35":
|
||||
.sp
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#include <stdlib.h>
|
||||
int ssize = 10;
|
||||
char s[ssize];
|
||||
strfromf(s, ssize, "%.2f", 12.3456);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
To convert the value 12.345e19 as a double type to a string using
|
||||
scientific notation with zero digits of precision, resulting in "1E+20":
|
||||
.sp
|
||||
.in +4
|
||||
.nf
|
||||
.EX
|
||||
#define __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#include <stdlib.h>
|
||||
int ssize = 10;
|
||||
char s[ssize];
|
||||
strfromd(s, ssize, "%.E", 12.345e19);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SH SEE ALSO
|
||||
.BR atof (3),
|
||||
|
|
|
@ -59,7 +59,7 @@ is defined in
|
|||
as follows:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
struct tm {
|
||||
int tm_sec; /* Seconds (0-60) */
|
||||
int tm_min; /* Minutes (0-59) */
|
||||
|
@ -71,7 +71,7 @@ struct tm {
|
|||
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
|
||||
int tm_isdst; /* Daylight saving time */
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
For more details on the
|
||||
|
@ -418,7 +418,7 @@ The following example demonstrates the use of
|
|||
and
|
||||
.BR strftime (3).
|
||||
.sp
|
||||
.nf
|
||||
.EX
|
||||
#define _XOPEN_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -437,7 +437,7 @@ main(void)
|
|||
puts(buf);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR time (2),
|
||||
.BR getdate (3),
|
||||
|
|
|
@ -202,9 +202,9 @@ implementation-defined numeric strings.
|
|||
BSD also has
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
.BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base );
|
||||
.sp
|
||||
.EX
|
||||
.in
|
||||
.fi
|
||||
with completely analogous definition.
|
||||
|
|
|
@ -199,13 +199,13 @@ In locales other than the "C" locale, other strings may be accepted.
|
|||
supported.)
|
||||
.LP
|
||||
BSD also has
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
.BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base );
|
||||
.sp
|
||||
.in -4n
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
with completely analogous definition.
|
||||
Depending on the wordsize of the current architecture, this
|
||||
may be equivalent to
|
||||
|
|
|
@ -94,13 +94,13 @@ that is a pointer to a \fItermios\fP structure.
|
|||
This structure contains at least the following members:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
tcflag_t c_iflag; /* input modes */
|
||||
tcflag_t c_oflag; /* output modes */
|
||||
tcflag_t c_cflag; /* control modes */
|
||||
tcflag_t c_lflag; /* local modes */
|
||||
cc_t c_cc[NCCS]; /* special characters */
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The values that may be assigned to these fields are described below.
|
||||
|
@ -292,7 +292,7 @@ or
|
|||
.B _BSD_SOURCE
|
||||
or
|
||||
.BR _SVID_SOURCE ]
|
||||
.sp
|
||||
.IP
|
||||
(POSIX says that the baud speed is stored in the
|
||||
.I termios
|
||||
structure without specifying where precisely, and provides
|
||||
|
|
|
@ -43,26 +43,33 @@ These functions calculate the Gamma function of
|
|||
.IR x .
|
||||
.PP
|
||||
The Gamma function is defined by
|
||||
.sp
|
||||
Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
|
||||
.sp
|
||||
.PP
|
||||
.RS
|
||||
Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
|
||||
.RE
|
||||
.PP
|
||||
It is defined for every real number except for nonpositive integers.
|
||||
For nonnegative integral
|
||||
.I m
|
||||
one has
|
||||
.sp
|
||||
Gamma(m+1) = m!
|
||||
.sp
|
||||
.PP
|
||||
.RS
|
||||
Gamma(m+1) = m!
|
||||
.RE
|
||||
.PP
|
||||
and, more generally, for all
|
||||
.IR x :
|
||||
.sp
|
||||
Gamma(x+1) = x * Gamma(x)
|
||||
.sp
|
||||
.PP
|
||||
.RS
|
||||
Gamma(x+1) = x * Gamma(x)
|
||||
.RE
|
||||
.PP
|
||||
Furthermore, the following is valid for all values of
|
||||
.I x
|
||||
outside the poles:
|
||||
.sp
|
||||
Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
|
||||
.PP
|
||||
.RS
|
||||
Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
On success, these functions return Gamma(x).
|
||||
|
|
|
@ -62,12 +62,12 @@ structures, defined in
|
|||
as:
|
||||
.sp
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
struct timeval {
|
||||
time_t tv_sec; /* seconds */
|
||||
suseconds_t tv_usec; /* microseconds */
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
.BR timeradd ()
|
||||
|
|
|
@ -233,8 +233,8 @@ implementation, but is not in the System V documentation.
|
|||
The following program inserts twelve random numbers into a binary
|
||||
tree, where duplicate numbers are collapsed, then prints the numbers
|
||||
in order.
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
#define _GNU_SOURCE /* Expose declaration of tdestroy() */
|
||||
#include <search.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -305,7 +305,7 @@ main(void)
|
|||
tdestroy(root, free);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR bsearch (3),
|
||||
.BR hsearch (3),
|
||||
|
|
47
man3/tzset.3
47
man3/tzset.3
|
@ -93,11 +93,13 @@ The value of
|
|||
can be one of two formats.
|
||||
The first format is a string of characters that directly represent the
|
||||
timezone to be used:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]]
|
||||
.RE
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
There are no spaces in the specification.
|
||||
The \fIstd\fP string specifies an abbreviation for the timezone and must be
|
||||
three or more alphabetic characters.
|
||||
|
@ -111,10 +113,12 @@ The \fIoffset\fP is positive
|
|||
if the local timezone is west of the Prime Meridian and negative if it is
|
||||
east.
|
||||
The hour must be between 0 and 24, and the minutes and seconds 00 and 59:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.RI [ + | - ] hh [ :mm [ :ss ]]
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
|
||||
corresponding daylight saving timezone.
|
||||
|
@ -153,18 +157,21 @@ where the standard time (NZST) is 12 hours ahead of UTC,
|
|||
and daylight saving time (NZDT), 13 hours ahead of UTC,
|
||||
runs from the first Sunday in October to the third Sunday in March,
|
||||
and the changeovers happen at the default time of 02:00:00:
|
||||
.nf
|
||||
|
||||
TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
|
||||
.fi
|
||||
.in +4n
|
||||
.EX
|
||||
TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The second format specifies that the timezone information should be read
|
||||
from a file:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
:[filespec]
|
||||
.RE
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
If the file specification \fIfilespec\fP is omitted, or its value cannot
|
||||
be interpreted, then Coordinated Universal Time (UTC) is used.
|
||||
If \fIfilespec\fP is given, it specifies another
|
||||
|
@ -176,10 +183,12 @@ If the colon is omitted each
|
|||
of the above \fBTZ\fP formats will be tried.
|
||||
.PP
|
||||
Here's an example, once more for New Zealand:
|
||||
.nf
|
||||
|
||||
TZ=":Pacific/Auckland"
|
||||
.fi
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
TZ=":Pacific/Auckland"
|
||||
.EE
|
||||
.in
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B TZ
|
||||
|
|
|
@ -81,12 +81,13 @@ Present on Solaris, NetBSD, and perhaps other systems.
|
|||
For consistency with the other "utmpx" functions (see
|
||||
.BR getutxent (3)),
|
||||
glibc provides (since version 2.1):
|
||||
.nf
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.B #include <utmpx.h>
|
||||
.sp
|
||||
.BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
This function performs the same task as
|
||||
.BR updwtmp (),
|
||||
|
|
|
@ -125,15 +125,15 @@ in the range [0,1000000].
|
|||
Programs will be more portable
|
||||
if they never mention this type explicitly.
|
||||
Use
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.sp
|
||||
.EX
|
||||
#include <unistd.h>
|
||||
\&...
|
||||
unsigned int usecs;
|
||||
\&...
|
||||
usleep(usecs);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.LP
|
||||
The interaction of this function with the
|
||||
|
@ -151,7 +151,7 @@ signal, and with other timer functions such as
|
|||
.BR ualarm (3)
|
||||
is unspecified.
|
||||
.SH SEE ALSO
|
||||
.BR alarm (2),
|
||||
BR alarm (2),
|
||||
.BR getitimer (2),
|
||||
.BR nanosleep (2),
|
||||
.BR select (2),
|
||||
|
|
|
@ -97,8 +97,8 @@ wide-character string is destructively modified during
|
|||
the operation.
|
||||
.SH EXAMPLE
|
||||
The following code loops over the tokens contained in a wide-character string.
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
wchar_t *wcs = ...;
|
||||
wchar_t *token;
|
||||
wchar_t *state;
|
||||
|
@ -107,7 +107,7 @@ for (token = wcstok(wcs, " \\t\\n", &state);
|
|||
token = wcstok(NULL, " \\t\\n", &state)) {
|
||||
...
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR strtok (3),
|
||||
.BR wcschr (3)
|
||||
|
|
|
@ -72,7 +72,7 @@ that invoke special functions (i.e., anything other than writing a
|
|||
glyph at the current cursor location) on the Linux console.
|
||||
.PP
|
||||
.B "Control characters"
|
||||
.sp
|
||||
.PP
|
||||
A character is a control character if (before transformation
|
||||
according to the mapping table) it has one of the 14 codes
|
||||
00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT),
|
||||
|
@ -164,7 +164,7 @@ T}
|
|||
.TE
|
||||
.PP
|
||||
.B "ECMA-48 CSI sequences"
|
||||
.sp
|
||||
.PP
|
||||
CSI (or ESC [) is followed by a sequence of parameters,
|
||||
at most NPAR (16), that are decimal numbers separated by
|
||||
semicolons.
|
||||
|
@ -223,7 +223,7 @@ u ? Restore cursor location.
|
|||
.TE
|
||||
.PP
|
||||
.B ECMA-48 Set Graphics Rendition
|
||||
.sp
|
||||
.PP
|
||||
The ECMA-48 SGR sequence ESC [ \fIparameters\fP m sets display
|
||||
attributes.
|
||||
Several attributes can be set in the same sequence, separated by
|
||||
|
@ -308,7 +308,7 @@ where \fIx,y\fP is the cursor location.
|
|||
.\"
|
||||
.PP
|
||||
.B DEC Private Mode (DECSET/DECRST) sequences
|
||||
.sp
|
||||
.PP
|
||||
.\"
|
||||
These are not described in ECMA-48.
|
||||
We list the Set Mode sequences;
|
||||
|
@ -355,7 +355,7 @@ to 0)\(emsee below.
|
|||
.\"
|
||||
.PP
|
||||
.B Linux Console Private CSI Sequences
|
||||
.sp
|
||||
.PP
|
||||
.\"
|
||||
The following sequences are neither ECMA-48 nor native VT102.
|
||||
They are native to the Linux console driver.
|
||||
|
@ -472,7 +472,7 @@ Linux console and the two most important others, the DEC VT102 and
|
|||
.\"
|
||||
.PP
|
||||
.B Control-character handling
|
||||
.sp
|
||||
.PP
|
||||
The VT102 also recognized the following control characters:
|
||||
.HP
|
||||
NUL (0x00) was ignored;
|
||||
|
@ -493,7 +493,7 @@ BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC.
|
|||
.\"
|
||||
.PP
|
||||
.B Escape sequences
|
||||
.sp
|
||||
.PP
|
||||
VT100 console sequences not implemented on the Linux console:
|
||||
.TS
|
||||
l l l.
|
||||
|
@ -568,7 +568,7 @@ implementation than Linux console.
|
|||
.\"
|
||||
.PP
|
||||
.B CSI Sequences
|
||||
.sp
|
||||
.PP
|
||||
Old versions of \fBxterm\fP(1), for example, from X11R5,
|
||||
interpret the blink SGR as a bold SGR.
|
||||
Later versions which implemented ANSI colors, for example,
|
||||
|
|
18
man4/hd.4
18
man4/hd.4
|
@ -76,30 +76,22 @@ refers to all of the first IDE drive in the system; and
|
|||
refers to the third DOS "primary" partition on the second one.
|
||||
.LP
|
||||
They are typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 660 /dev/hda b 3 0
|
||||
.br
|
||||
mknod \-m 660 /dev/hda1 b 3 1
|
||||
.br
|
||||
mknod \-m 660 /dev/hda2 b 3 2
|
||||
.br
|
||||
\&...
|
||||
.br
|
||||
mknod \-m 660 /dev/hda8 b 3 8
|
||||
.br
|
||||
mknod \-m 660 /dev/hdb b 3 64
|
||||
.br
|
||||
mknod \-m 660 /dev/hdb1 b 3 65
|
||||
.br
|
||||
mknod \-m 660 /dev/hdb2 b 3 66
|
||||
.br
|
||||
\&...
|
||||
.br
|
||||
mknod \-m 660 /dev/hdb8 b 3 72
|
||||
.br
|
||||
chown root:disk /dev/hd*
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH FILES
|
||||
/dev/hd*
|
||||
.SH SEE ALSO
|
||||
|
|
74
man4/hpsa.4
74
man4/hpsa.4
|
@ -40,8 +40,8 @@ should still be used for these.
|
|||
The
|
||||
.B hpsa
|
||||
driver supports the following Smart Array boards:
|
||||
.PP
|
||||
.nf
|
||||
|
||||
Smart Array P700M
|
||||
Smart Array P212
|
||||
Smart Array P410
|
||||
|
@ -96,48 +96,58 @@ This attribute contains the firmware version of the Smart Array.
|
|||
.IP
|
||||
For example:
|
||||
.IP
|
||||
.nf
|
||||
# \fBcd /sys/class/scsi_host/host4\fP
|
||||
# \fBcat firmware_revision\fP
|
||||
7.14
|
||||
.fi
|
||||
.in +4n
|
||||
.EX
|
||||
# \fBcd /sys/class/scsi_host/host4\fP
|
||||
# \fBcat firmware_revision\fP
|
||||
7.14
|
||||
.EE
|
||||
.in
|
||||
.\"
|
||||
.SS HPSA-specific disk attribute files in /sys
|
||||
.TP
|
||||
.I /sys/class/scsi_disk/c:b:t:l/device/unique_id
|
||||
This attribute contains a 32 hex-digit unique ID for each logical drive.
|
||||
.nf
|
||||
|
||||
.IP
|
||||
For example:
|
||||
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat unique_id\fP
|
||||
600508B1001044395355323037570F77
|
||||
.fi
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat unique_id\fP
|
||||
600508B1001044395355323037570F77
|
||||
.EE
|
||||
.in
|
||||
.TP
|
||||
.I /sys/class/scsi_disk/c:b:t:l/device/raid_level
|
||||
This attribute contains the RAID level of each logical drive.
|
||||
.nf
|
||||
|
||||
.IP
|
||||
For example:
|
||||
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat raid_level\fP
|
||||
RAID 0
|
||||
.fi
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat raid_level\fP
|
||||
RAID 0
|
||||
.EE
|
||||
.in
|
||||
.TP
|
||||
.I /sys/class/scsi_disk/c:b:t:l/device/lunid
|
||||
This attribute contains the 16 hex-digit (8 byte) LUN ID
|
||||
by which a logical drive or physical device can be addressed.
|
||||
.IR c : b : t : l
|
||||
are the controller, bus, target, and lun of the device.
|
||||
.nf
|
||||
|
||||
.PP
|
||||
For example:
|
||||
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat lunid\fP
|
||||
0x0000004000000000
|
||||
.fi
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
|
||||
# \fBcat lunid\fP
|
||||
0x0000004000000000
|
||||
.EE
|
||||
.in
|
||||
.\"
|
||||
.SS Supported ioctl() operations
|
||||
For compatibility with applications written for the
|
||||
.BR cciss (4)
|
||||
|
@ -162,9 +172,13 @@ Returns PCI domain, bus, device and function and "board ID" (PCI subsystem ID).
|
|||
.TP
|
||||
.B CCISS_GETDRIVVER
|
||||
Returns driver version in three bytes encoded as:
|
||||
.sp
|
||||
(major_version << 16) | (minor_version << 8) |
|
||||
(subminor_version)
|
||||
.IP
|
||||
.in +4n
|
||||
.EX
|
||||
(major_version << 16) | (minor_version << 8) |
|
||||
(subminor_version)
|
||||
.EE
|
||||
.in
|
||||
.TP
|
||||
.BR CCISS_PASSTHRU ", " CCISS_BIG_PASSTHRU
|
||||
Allows "BMIC" and "CISS" commands to be passed through to the Smart Array.
|
||||
|
|
31
man4/mem.4
31
man4/mem.4
|
@ -48,13 +48,14 @@ For example: on x86, RAM access is not allowed but accessing
|
|||
memory-mapped PCI regions is.
|
||||
.LP
|
||||
It is typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 660 /dev/mem c 1 1
|
||||
.br
|
||||
chown root:kmem /dev/mem
|
||||
.RE
|
||||
.LP
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The file
|
||||
.IR /dev/kmem
|
||||
is the same as
|
||||
|
@ -66,25 +67,27 @@ Since Linux 2.6.26, this file is available only if the
|
|||
kernel configuration option is enabled.
|
||||
.LP
|
||||
It is typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 640 /dev/kmem c 1 2
|
||||
.br
|
||||
chown root:kmem /dev/kmem
|
||||
.RE
|
||||
.LP
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
.IR /dev/port
|
||||
is similar to
|
||||
.IR /dev/mem ,
|
||||
but the I/O ports are accessed.
|
||||
.LP
|
||||
It is typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 660 /dev/port c 1 4
|
||||
.br
|
||||
chown root:kmem /dev/port
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH FILES
|
||||
.I /dev/mem
|
||||
.br
|
||||
|
|
10
man4/null.4
10
man4/null.4
|
@ -42,14 +42,14 @@ returns 0), whereas reads from
|
|||
always return bytes containing zero (\(aq\e0\(aq characters).
|
||||
.LP
|
||||
These devices are typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 666 /dev/null c 1 3
|
||||
.br
|
||||
mknod \-m 666 /dev/zero c 1 5
|
||||
.br
|
||||
chown root:root /dev/null /dev/zero
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH FILES
|
||||
.I /dev/null
|
||||
.br
|
||||
|
|
|
@ -32,12 +32,13 @@ The
|
|||
device is a block device to access the ram disk in raw mode.
|
||||
.LP
|
||||
It is typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 660 /dev/ram b 1 1
|
||||
.br
|
||||
chown root:disk /dev/ram
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH FILES
|
||||
/dev/ram
|
||||
.SH SEE ALSO
|
||||
|
|
12
man4/sd.4
12
man4/sd.4
|
@ -51,11 +51,11 @@ where
|
|||
is the number of the physical drive in order of detection, and
|
||||
.I partition_number
|
||||
is as follows:
|
||||
.sp
|
||||
.IP +3
|
||||
partition 0 is the whole drive
|
||||
.br
|
||||
.IP
|
||||
partitions 1-4 are the DOS "primary" partitions
|
||||
.br
|
||||
.IP
|
||||
partitions 5-8 are the DOS "extended" (or "logical") partitions
|
||||
.PP
|
||||
For example,
|
||||
|
@ -75,16 +75,16 @@ are provided:
|
|||
.TP
|
||||
.B HDIO_GETGEO
|
||||
Returns the BIOS disk parameters in the following structure:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
struct hd_geometry {
|
||||
unsigned char heads;
|
||||
unsigned char sectors;
|
||||
unsigned short cylinders;
|
||||
unsigned long start;
|
||||
};
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
A pointer to this structure is passed as the
|
||||
|
|
12
man4/ttyS.4
12
man4/ttyS.4
|
@ -31,18 +31,16 @@ ttyS \- serial terminal lines
|
|||
are character devices for the serial terminal lines.
|
||||
.LP
|
||||
They are typically created by:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
mknod \-m 660 /dev/ttyS0 c 4 64 # base address 0x3f8
|
||||
.br
|
||||
mknod \-m 660 /dev/ttyS1 c 4 65 # base address 0x2f8
|
||||
.br
|
||||
mknod \-m 660 /dev/ttyS2 c 4 66 # base address 0x3e8
|
||||
.br
|
||||
mknod \-m 660 /dev/ttyS3 c 4 67 # base address 0x2e8
|
||||
.br
|
||||
chown root:tty /dev/ttyS[0\-3]
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH FILES
|
||||
/dev/ttyS[0\-3]
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -137,7 +137,7 @@ optional period and 3 character extension.
|
|||
.B ncpfs
|
||||
is a network filesystem that supports the NCP protocol, used by
|
||||
Novell NetWare.
|
||||
.sp
|
||||
.IP
|
||||
To use
|
||||
.BR ncpfs ,
|
||||
you need special programs, which can be found at
|
||||
|
@ -167,7 +167,7 @@ that was integrated into Linux in kernel 2.4.1.
|
|||
.B smb
|
||||
is a network filesystem that supports the SMB protocol, used by
|
||||
Windows for Workgroups, Windows NT, and Lan Manager.
|
||||
.sp
|
||||
.IP
|
||||
To use
|
||||
.B smb
|
||||
fs, you need a special mount program, which can be found in the ksmbfs
|
||||
|
|
10
man5/group.5
10
man5/group.5
|
@ -31,11 +31,13 @@ The
|
|||
.I /etc/group
|
||||
file is a text file that defines the groups on the system.
|
||||
There is one entry per line, with the following format:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
group_name:password:GID:user_list
|
||||
.RE
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The fields are as follows:
|
||||
.TP 12
|
||||
.I group_name
|
||||
|
|
|
@ -78,11 +78,13 @@ to set it.
|
|||
.PP
|
||||
Each line of the file describes a single user,
|
||||
and contains seven colon-separated fields:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
name:password:UID:GID:GECOS:directory:shell
|
||||
.RE
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The field are as follows:
|
||||
.TP 12
|
||||
.I name
|
||||
|
|
|
@ -45,14 +45,14 @@ disallow access to users with shells not included in this file.
|
|||
.SH EXAMPLE
|
||||
.I /etc/shells
|
||||
may contain the following paths:
|
||||
.sp
|
||||
.RS
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
.I /bin/sh
|
||||
.br
|
||||
.I /bin/bash
|
||||
.br
|
||||
.I /bin/csh
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH SEE ALSO
|
||||
.BR chsh (1),
|
||||
.BR getusershell (3)
|
||||
|
|
|
@ -84,9 +84,9 @@ boolean, then numeric, and then string capabilities, each sorted
|
|||
alphabetically without looking at lower or upper spelling.
|
||||
Capabilities of similar functions can be written in one line.
|
||||
.LP
|
||||
.nf
|
||||
Example for:
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e
|
||||
Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e
|
||||
Boolean: :bs:\e
|
||||
|
@ -436,7 +436,7 @@ The first character is the name of the block graphic
|
|||
symbol and the second characters is its definition.
|
||||
.LP
|
||||
The following names are available:
|
||||
.sp
|
||||
.PP
|
||||
.nf
|
||||
+ right arrow (>)
|
||||
, left arrow (<)
|
||||
|
@ -464,7 +464,7 @@ w normal tee (+)
|
|||
x vertical line (|)
|
||||
~ paragraph (???)
|
||||
.fi
|
||||
.sp
|
||||
.PP
|
||||
The values in parentheses are suggested defaults which are used by the
|
||||
.IR curses
|
||||
library, if the capabilities are missing.
|
||||
|
|
|
@ -58,12 +58,13 @@ the tty definitions file.
|
|||
A typical
|
||||
.I /etc/ttytype
|
||||
is:
|
||||
.RS
|
||||
.sp
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
con80x25 tty1
|
||||
.br
|
||||
vt320 ttys0
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.SH SEE ALSO
|
||||
.BR termcap (5),
|
||||
.BR terminfo (5),
|
||||
|
|
|
@ -83,18 +83,17 @@ These values serve as indices into the next field.
|
|||
.I tzh_typecnt
|
||||
.I ttinfo
|
||||
entries, each defined as follows:
|
||||
.in +.5i
|
||||
.sp
|
||||
.nf
|
||||
.ta .5i +\w'unsigned char\0\0'u
|
||||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
struct ttinfo {
|
||||
int32_t tt_gmtoff;
|
||||
unsigned char tt_isdst;
|
||||
unsigned char tt_abbrind;
|
||||
int32_t tt_gmtoff;
|
||||
unsigned char tt_isdst;
|
||||
unsigned char tt_abbrind;
|
||||
};
|
||||
.in -.5i
|
||||
.fi
|
||||
.sp
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
Each structure is written as a four-byte signed integer value for
|
||||
.IR tt_gmtoff ,
|
||||
in a standard byte order, followed by a one-byte value for
|
||||
|
|
20
man5/utmp.5
20
man5/utmp.5
|
@ -57,9 +57,9 @@ declared as follows in
|
|||
.IR <utmp.h>
|
||||
(note that this is only one of several definitions
|
||||
around; details depend on the version of libc):
|
||||
.in
|
||||
.in +4n
|
||||
.nf
|
||||
.sp
|
||||
.EX
|
||||
/* Values for ut_type field, below */
|
||||
|
||||
#define EMPTY 0 /* Record does not contain valid info
|
||||
|
@ -127,9 +127,9 @@ struct utmp {
|
|||
#endif
|
||||
#define ut_xtime ut_tv.tv_sec
|
||||
#define ut_addr ut_addr_v6[0]
|
||||
.sp
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
This structure gives the name of the special file associated with the
|
||||
user's terminal, the user's login name, and the time of login in the form
|
||||
of
|
||||
|
@ -309,24 +309,24 @@ and
|
|||
.IR tv_usec .
|
||||
Since \fIut_tv\fP may not be the same as \fIstruct timeval\fP,
|
||||
then instead of the call:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.sp
|
||||
.EX
|
||||
gettimeofday((struct timeval *) &ut.ut_tv, NULL);
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
the following method of setting this field is recommended:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.sp
|
||||
.EX
|
||||
struct utmp ut;
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
ut.ut_tv.tv_sec = tv.tv_sec;
|
||||
ut.ut_tv.tv_usec = tv.tv_usec;
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.\" .PP
|
||||
.\" Note that the \fIutmp\fP struct from libc5 has changed in libc6.
|
||||
|
|
|
@ -123,7 +123,7 @@ _
|
|||
\}
|
||||
.SS Tables
|
||||
For convenience, below are more compact tables in hex and decimal.
|
||||
.sp
|
||||
.PP
|
||||
.nf
|
||||
.if t \{\
|
||||
.in 1i
|
||||
|
|
160
man7/bootparam.7
160
man7/bootparam.7
|
@ -35,7 +35,7 @@ In general, this is used to
|
|||
supply the kernel with information about hardware parameters that
|
||||
the kernel would not be able to determine on its own, or to avoid/override
|
||||
the values that the kernel would otherwise detect.
|
||||
|
||||
.PP
|
||||
When the kernel is booted directly by the BIOS,
|
||||
you have no opportunity to specify any parameters.
|
||||
So, in order to take advantage of this possibility you have to
|
||||
|
@ -44,11 +44,11 @@ use a boot loader that is able to pass parameters, such as GRUB.
|
|||
The kernel command line is parsed into a list of strings
|
||||
(boot arguments) separated by spaces.
|
||||
Most of the boot arguments have the form:
|
||||
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
name[=value_1][,value_2]...[,value_10]
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.LP
|
||||
where 'name' is a unique keyword that is used to identify what part of
|
||||
|
@ -58,14 +58,14 @@ separated parameters per keyword.
|
|||
(However, you can reuse the same
|
||||
keyword with up to an additional 10 parameters in unusually
|
||||
complicated situations, assuming the setup function supports it.)
|
||||
|
||||
.PP
|
||||
Most of the sorting is coded in the kernel source file
|
||||
.IR init/main.c .
|
||||
First, the kernel
|
||||
checks to see if the argument is any of the special arguments 'root=',
|
||||
\&'nfsroot=', 'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'.
|
||||
The meaning of these special arguments is described below.
|
||||
|
||||
.PP
|
||||
Then it walks a list of setup functions
|
||||
to see if the specified argument string (such as 'foo') has
|
||||
been associated with a setup function ('foo_setup()') for a particular
|
||||
|
@ -76,13 +76,13 @@ if 'foo' was registered.
|
|||
If it was, then it would call the setup
|
||||
function associated with 'foo' (foo_setup()) and hand it the arguments
|
||||
3, 4, 5, and 6 as given on the kernel command line.
|
||||
|
||||
.PP
|
||||
Anything of the form 'foo=bar' that is not accepted as a setup function
|
||||
as described above is then interpreted as an environment variable to
|
||||
be set.
|
||||
A (useless?) example would be to use 'TERM=vt100' as a boot
|
||||
argument.
|
||||
|
||||
.PP
|
||||
Any remaining arguments that were not picked up by the kernel and were
|
||||
not interpreted as environment variables are then passed onto PID 1,
|
||||
which is usually the
|
||||
|
@ -132,7 +132,7 @@ system that the kernel was built on.
|
|||
To override this value, and
|
||||
select the second floppy drive as the root device, one would
|
||||
use 'root=/dev/fd1'.
|
||||
|
||||
.IP
|
||||
The root device can be specified symbolically or numerically.
|
||||
A symbolic specification has the form
|
||||
.IR /dev/XXYN ,
|
||||
|
@ -141,11 +141,11 @@ the device type (e.g., 'hd' for ST-506 compatible hard disk, with Y in
|
|||
\&'a'-'d'; 'sd' for SCSI compatible disk, with Y in 'a'-'e'),
|
||||
Y the driver letter or
|
||||
number, and N the number (in decimal) of the partition on this device.
|
||||
|
||||
.IP
|
||||
Note that this has nothing to do with the designation of these
|
||||
devices on your filesystem.
|
||||
The '/dev/' part is purely conventional.
|
||||
|
||||
.IP
|
||||
The more awkward and less portable numeric specification of the above
|
||||
possible root devices in major/minor format is also accepted.
|
||||
(For example,
|
||||
|
@ -179,7 +179,7 @@ write to files on the filesystem in question until it is 'remounted'
|
|||
as read/write capable, for example, by 'mount \-w \-n \-o remount /'.
|
||||
(See also
|
||||
.BR mount (8).)
|
||||
|
||||
.IP
|
||||
The 'rw' option tells the kernel to mount the root filesystem read/write.
|
||||
This is the default.
|
||||
.TP
|
||||
|
@ -187,41 +187,41 @@ This is the default.
|
|||
This tells the kernel the location of the suspend-to-disk data that you want the machine to resume from after hibernation.
|
||||
Usually, it is the same as your swap partition or file.
|
||||
Example:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
resume=/dev/hda2
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.TP
|
||||
.B "'reserve=...'"
|
||||
This is used to protect I/O port regions from probes.
|
||||
The form of the command is:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
.BI reserve= iobase,extent[,iobase,extent]...
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.IP
|
||||
In some machines it may be necessary to prevent device drivers from
|
||||
checking for devices (auto-probing) in a specific region.
|
||||
This may be
|
||||
because of hardware that reacts badly to the probing, or hardware
|
||||
that would be mistakenly identified, or merely
|
||||
hardware you don't want the kernel to initialize.
|
||||
|
||||
.IP
|
||||
The reserve boot-time argument specifies an I/O port region that
|
||||
shouldn't be probed.
|
||||
A device driver will not probe a reserved region,
|
||||
unless another boot argument explicitly specifies that it do so.
|
||||
|
||||
.IP
|
||||
For example, the boot line
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
reserve=0x300,32 blah=0x300
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
keeps all device drivers except the driver for 'blah' from probing
|
||||
|
@ -231,11 +231,11 @@ keeps all device drivers except the driver for 'blah' from probing
|
|||
By default, the kernel will not reboot after a panic, but this option
|
||||
will cause a kernel reboot after N seconds (if N is greater than zero).
|
||||
This panic timeout can also be set by
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
echo N > /proc/sys/kernel/panic
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.TP
|
||||
.B "'reboot=[warm|cold][,[bios|hard]]'"
|
||||
|
@ -300,13 +300,13 @@ when that is given, or 2, the default.
|
|||
The significance of this variable is that it
|
||||
gives the granularity of the profiling: each clock tick, if the
|
||||
system was executing kernel code, a counter is incremented:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
profile[address >> prof_shift]++;
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.IP
|
||||
The raw profiling information can be read from
|
||||
.IR /proc/profile .
|
||||
Probably you'll want to use a tool such as readprofile.c to digest it.
|
||||
|
@ -324,7 +324,7 @@ ramdisk.
|
|||
One might also have a system in which first
|
||||
some modules (for filesystem or hardware) must be loaded
|
||||
before the main disk can be accessed.
|
||||
|
||||
.IP
|
||||
In Linux 1.3.48, ramdisk handling was changed drastically.
|
||||
Earlier, the memory was allocated statically, and there was
|
||||
a 'ramdisk=N' parameter to tell its size.
|
||||
|
@ -335,7 +335,7 @@ setup, see the kernel source file
|
|||
.IR Documentation/blockdev/ramdisk.txt
|
||||
.RI ( Documentation/ramdisk.txt
|
||||
in older kernels).
|
||||
|
||||
.IP
|
||||
There are four parameters, two boolean and two integral.
|
||||
.TP
|
||||
.B "'load_ramdisk=N'"
|
||||
|
@ -376,10 +376,10 @@ finally
|
|||
the usual boot sequence (e.g., invocation of
|
||||
.IR /sbin/init )
|
||||
is performed.
|
||||
|
||||
.IP
|
||||
For a detailed description of the initrd feature, see the kernel source file
|
||||
.IR Documentation/initrd.txt .
|
||||
|
||||
.IP
|
||||
The 'noinitrd' option tells the kernel that although it was compiled for
|
||||
operation with initrd, it should not go through the above steps, but
|
||||
leave the initrd data under
|
||||
|
@ -389,12 +389,12 @@ the last process that used it has closed
|
|||
.IR /dev/initrd .)
|
||||
.SS Boot arguments for SCSI devices
|
||||
General notation for this section:
|
||||
|
||||
.PP
|
||||
.I iobase
|
||||
-- the first I/O port that the SCSI host occupies.
|
||||
These are specified in hexadecimal notation,
|
||||
and usually lie in the range from 0x200 to 0x3ff.
|
||||
|
||||
.PP
|
||||
.I irq
|
||||
-- the hardware interrupt that the card is configured to use.
|
||||
Valid values will be dependent on the card in question, but will
|
||||
|
@ -402,7 +402,7 @@ usually be 5, 7, 9, 10, 11, 12, and 15.
|
|||
The other values are usually
|
||||
used for common peripherals like IDE hard disks, floppies, serial
|
||||
ports, and so on.
|
||||
|
||||
.PP
|
||||
.I scsi-id
|
||||
-- the ID that the host adapter uses to identify itself on the
|
||||
SCSI bus.
|
||||
|
@ -410,7 +410,7 @@ Only some host adapters allow you to change this value, as
|
|||
most have it permanently specified internally.
|
||||
The usual default value
|
||||
is 7, but the Seagate and Future Domain TMC-950 boards use 6.
|
||||
|
||||
.PP
|
||||
.I parity
|
||||
-- whether the SCSI host adapter expects the attached devices
|
||||
to supply a parity value with all information exchanges.
|
||||
|
@ -429,13 +429,13 @@ Each CD is addressed as a
|
|||
But most
|
||||
devices, such as hard disks, tape drives and such are only one device,
|
||||
and will be assigned to LUN zero.
|
||||
|
||||
.IP
|
||||
Some poorly designed SCSI devices cannot handle being probed for
|
||||
LUNs not equal to zero.
|
||||
Therefore, if the compile-time flag
|
||||
.B CONFIG_SCSI_MULTI_LUN
|
||||
is not set, newer kernels will by default probe only LUN zero.
|
||||
|
||||
.IP
|
||||
To specify the number of probed LUNs at boot, one enters
|
||||
\&'max_scsi_luns=n' as a boot arg, where n is a number between one and
|
||||
eight.
|
||||
|
@ -445,13 +445,13 @@ avoid upsetting such broken devices.
|
|||
.B "SCSI tape configuration"
|
||||
Some boot time configuration of the SCSI tape driver can be achieved
|
||||
by using the following:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
.BI st= buf_size[,write_threshold[,max_bufs]]
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.sp
|
||||
.IP
|
||||
The first two numbers are specified in units of kB.
|
||||
The default
|
||||
.I buf_size
|
||||
|
@ -464,11 +464,11 @@ default value of 30kB.
|
|||
The maximum number of buffers varies
|
||||
with the number of drives detected, and has a default of two.
|
||||
An example usage would be:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
st=32,30,2
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
Full details can be found in the file
|
||||
|
@ -482,11 +482,11 @@ for older kernels) in the Linux kernel source.
|
|||
The IDE driver accepts a number of parameters, which range from disk
|
||||
geometry specifications, to support for broken controller chips.
|
||||
Drive-specific options are specified by using 'hdX=' with X in 'a'-'h'.
|
||||
|
||||
.IP
|
||||
Non-drive-specific options are specified with the prefix 'hd='.
|
||||
Note that using a drive-specific prefix for a non-drive-specific option
|
||||
will still work, and the option will just be applied as expected.
|
||||
|
||||
.IP
|
||||
Also note that 'hd=' can be used to refer to the next unspecified
|
||||
drive in the (a, ..., h) sequence.
|
||||
For the following discussions,
|
||||
|
@ -522,11 +522,11 @@ used at the same time.
|
|||
.B "The 'hd=noprobe' option"
|
||||
Do not probe for this drive.
|
||||
For example,
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
hdb=noprobe hdb=1166,7,17
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
would disable the probe, but still specify the drive geometry so
|
||||
|
@ -553,11 +553,11 @@ values (C/H/S); any more or any less and it will silently ignore you.
|
|||
Also, it accepts only 'hd=' as an argument, that is, 'hda='
|
||||
and so on are not valid here.
|
||||
The format is as follows:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
hd=cyls,heads,sects
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
If there are two disks installed, the above is repeated with the
|
||||
|
@ -566,33 +566,33 @@ geometry parameters of the second disk.
|
|||
Different drivers make use of different parameters, but they all at
|
||||
least share having an IRQ, an I/O port base value, and a name.
|
||||
In its most generic form, it looks something like this:
|
||||
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
ether=irq,iobase[,param_1[,...param_8]],name
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
|
||||
.PP
|
||||
The first nonnumeric argument is taken as the name.
|
||||
The param_n values (if applicable) usually have different meanings for each
|
||||
different card/driver.
|
||||
Typical param_n values are used to specify
|
||||
things like shared memory address, interface selection, DMA channel
|
||||
and the like.
|
||||
|
||||
.PP
|
||||
The most common use of this parameter is to force probing for a second
|
||||
ethercard, as the default is to probe only for one.
|
||||
This can be accomplished with a simple:
|
||||
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
ether=0,0,eth1
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
|
||||
.PP
|
||||
Note that the values of zero for the IRQ and I/O base in the above
|
||||
example tell the driver(s) to autoprobe.
|
||||
|
||||
.PP
|
||||
The Ethernet-HowTo has extensive documentation on using multiple
|
||||
cards and on the card/driver-specific implementation
|
||||
of the param_n values where used.
|
||||
|
@ -617,25 +617,25 @@ It is described in the Linux kernel source file
|
|||
in older kernel versions).
|
||||
It accepts
|
||||
a boot argument of the form:
|
||||
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
sound=device1[,device2[,device3...[,device10]]]
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
.PP
|
||||
where each deviceN value is of the following format 0xTaaaId and the
|
||||
bytes are used as follows:
|
||||
|
||||
.PP
|
||||
T \- device type: 1=FM, 2=SB, 3=PAS, 4=GUS, 5=MPU401, 6=SB16,
|
||||
7=SB16-MPU401
|
||||
|
||||
.PP
|
||||
aaa \- I/O address in hex.
|
||||
|
||||
.PP
|
||||
I \- interrupt line in hex (i.e., 10=a, 11=b, ...)
|
||||
|
||||
.PP
|
||||
d \- DMA channel.
|
||||
|
||||
.PP
|
||||
As you can see, it gets pretty messy, and you are better off to compile
|
||||
in your own personal values as recommended.
|
||||
Using a boot argument of
|
||||
|
@ -645,14 +645,14 @@ Using a boot argument of
|
|||
.B "'lp='"
|
||||
.br
|
||||
Syntax:
|
||||
|
||||
.IP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
lp=0
|
||||
lp=auto
|
||||
lp=reset
|
||||
lp=port[,port...]
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.IP
|
||||
You can tell the printer driver what ports to use and what ports not
|
||||
|
@ -660,7 +660,7 @@ to use.
|
|||
The latter comes in handy if you don't want the printer driver
|
||||
to claim all available parallel ports, so that other drivers
|
||||
(e.g., PLIP, PPA) can use them instead.
|
||||
|
||||
.IP
|
||||
The format of the argument is multiple port names.
|
||||
For example,
|
||||
lp=none,parport0 would use the first parallel port for lp1, and
|
||||
|
@ -672,6 +672,6 @@ lp=0.
|
|||
.SH SEE ALSO
|
||||
.BR klogd (8),
|
||||
.BR mount (8)
|
||||
|
||||
.PP
|
||||
For up-to-date information, see the kernel source file
|
||||
.IR Documentation/admin-guide/kernel-parameters.txt .
|
||||
|
|
|
@ -37,8 +37,8 @@ some complex-only functions.
|
|||
Your C-compiler can work with complex numbers if it supports the C99 standard.
|
||||
Link with \fI\-lm\fP.
|
||||
The imaginary unit is represented by I.
|
||||
.sp
|
||||
.nf
|
||||
.PP
|
||||
.EX
|
||||
/* check that exp(i * pi) == \-1 */
|
||||
#include <math.h> /* for atan */
|
||||
#include <stdio.h>
|
||||
|
@ -51,7 +51,7 @@ main(void)
|
|||
double complex z = cexp(I * pi);
|
||||
printf("%f + %f * i\\n", creal(z), cimag(z));
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.BR cabs (3),
|
||||
.BR cacos (3),
|
||||
|
|
|
@ -376,13 +376,13 @@ displaying the process's
|
|||
in the two formats \fBMask Format\fR and \fBList Format\fR (see below)
|
||||
as shown in the following example:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
.in +4n
|
||||
.EX
|
||||
Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
|
||||
Cpus_allowed_list: 0-127
|
||||
Mems_allowed: ffffffff,ffffffff
|
||||
Mems_allowed_list: 0-63
|
||||
.fi
|
||||
.EE
|
||||
.RE
|
||||
.PP
|
||||
The "allowed" fields were added in Linux 2.6.24;
|
||||
|
@ -493,12 +493,12 @@ of the to-be-released cpuset in
|
|||
The usual contents of the command
|
||||
.I /sbin/cpuset_release_agent
|
||||
is simply the shell script:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
#!/bin/sh
|
||||
rmdir /dev/cpuset/$1
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
As with other flag values below, this flag can
|
||||
|
@ -819,7 +819,7 @@ As of this writing, when this capability was introduced in Linux
|
|||
2.6.26, on certain popular architectures, the positive values of
|
||||
.I sched_relax_domain_level
|
||||
have the following meanings.
|
||||
.sp
|
||||
.PP
|
||||
.PD 0
|
||||
.IP \fB(1)\fR 4
|
||||
Perform immediate load balancing across Hyper-Thread
|
||||
|
@ -883,23 +883,23 @@ display all bits of the bit mask, based on the size of the bit mask.
|
|||
.PP
|
||||
Examples of the \fBMask Format\fR:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
.in +4n
|
||||
.EX
|
||||
00000001 # just bit 0 set
|
||||
40000000,00000000,00000000 # just bit 94 set
|
||||
00000001,00000000,00000000 # just bit 64 set
|
||||
000000ff,00000000 # bits 32-39 set
|
||||
00000000,000e3862 # 1,5,6,11-13,17-19 set
|
||||
.fi
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
A mask with bits 0, 1, 2, 4, 8, 16, 32, and 64 set displays as:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
.in +4n
|
||||
.EX
|
||||
00000001,00000001,00010117
|
||||
.fi
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The first "1" is for bit 64, the
|
||||
second for bit 32, the third for bit 16, the fourth for bit 8, the
|
||||
|
@ -915,12 +915,12 @@ numbers and ranges of numbers, in ASCII decimal.
|
|||
.PP
|
||||
Examples of the \fBList Format\fR:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
.in +4n
|
||||
.EX
|
||||
0-4,9 # bits 0, 1, 2, 3, 4, and 9 set
|
||||
0-2,7,12-14 # bits 0, 1, 2, 7, 12, 13, and 14 set
|
||||
.fi
|
||||
.RE
|
||||
.EE
|
||||
.in
|
||||
.\" ================== RULES ==================
|
||||
.SH RULES
|
||||
The following rules apply to each cpuset:
|
||||
|
@ -1033,13 +1033,13 @@ command in some shells does not display an error message if the
|
|||
system call fails.
|
||||
.\" Gack! csh(1)'s echo does this
|
||||
For example, if the command:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
echo 19 > cpuset.mems
|
||||
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
failed because memory node 19 was not allowed (perhaps
|
||||
the current system does not have a memory node 19), then the
|
||||
.B echo
|
||||
|
@ -1050,12 +1050,12 @@ external command to change cpuset file settings, as this
|
|||
command will display
|
||||
.BR write (2)
|
||||
errors, as in the example:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
/bin/echo 19 > cpuset.mems
|
||||
/bin/echo: write error: Invalid argument
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.\" ================== EXCEPTIONS ==================
|
||||
.SH EXCEPTIONS
|
||||
|
@ -1368,7 +1368,7 @@ options using shell commands.
|
|||
.SS Creating and attaching to a cpuset.
|
||||
To create a new cpuset and attach the current command shell to it,
|
||||
the steps are:
|
||||
.sp
|
||||
.PP
|
||||
.PD 0
|
||||
.IP 1) 4
|
||||
mkdir /dev/cpuset (if not already done)
|
||||
|
@ -1386,9 +1386,9 @@ Attach the shell to the new cpuset.
|
|||
For example, the following sequence of commands will set up a cpuset
|
||||
named "Charlie", containing just CPUs 2 and 3, and memory node 1,
|
||||
and then attach the current shell to that cpuset.
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
.RB "$" " mkdir /dev/cpuset"
|
||||
.RB "$" " mount \-t cpuset cpuset /dev/cpuset"
|
||||
.RB "$" " cd /dev/cpuset"
|
||||
|
@ -1400,14 +1400,15 @@ and then attach the current shell to that cpuset.
|
|||
# The current shell is now running in cpuset Charlie
|
||||
# The next line should display '/Charlie'
|
||||
.RB "$" " cat /proc/self/cpuset"
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.\"
|
||||
.SS Migrating a job to different memory nodes.
|
||||
To migrate a job (the set of processes attached to a cpuset)
|
||||
to different CPUs and memory nodes in the system, including moving
|
||||
the memory pages currently allocated to that job,
|
||||
perform the following steps.
|
||||
.sp
|
||||
.PP
|
||||
.PD 0
|
||||
.IP 1) 4
|
||||
Let's say we want to move the job in cpuset
|
||||
|
@ -1434,9 +1435,9 @@ to
|
|||
.PD
|
||||
.PP
|
||||
The following sequence of commands accomplishes this.
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
.RB "$" " cd /dev/cpuset"
|
||||
.RB "$" " mkdir beta"
|
||||
.RB "$" " cd beta"
|
||||
|
@ -1444,7 +1445,7 @@ The following sequence of commands accomplishes this.
|
|||
.RB "$" " /bin/echo 8-9 > cpuset.mems"
|
||||
.RB "$" " /bin/echo 1 > cpuset.memory_migrate"
|
||||
.RB "$" " while read i; do /bin/echo $i; done < ../alpha/tasks > tasks"
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The above should move any processes in
|
||||
|
@ -1455,11 +1456,11 @@ and any memory held by these processes on memory nodes 2-3 to memory
|
|||
nodes 8-9, respectively.
|
||||
.PP
|
||||
Notice that the last step of the above sequence did not do:
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
.EX
|
||||
.RB "$" " cp ../alpha/tasks tasks"
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
The
|
||||
|
@ -1478,11 +1479,11 @@ syntax that works on any shell, but alas more obscurely, by using the
|
|||
.B \-u
|
||||
(unbuffered) option of
|
||||
.BR sed (1):
|
||||
.PP
|
||||
.in +4n
|
||||
|
||||
.nf
|
||||
.EX
|
||||
.RB "$" " sed \-un p < ../alpha/tasks > tasks"
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.\" ================== SEE ALSO ==================
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -257,7 +257,7 @@ or
|
|||
from where it stopped before.
|
||||
.PP
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
#define MAX_EVENTS 10
|
||||
struct epoll_event ev, events[MAX_EVENTS];
|
||||
int listen_sock, conn_sock, nfds, epollfd;
|
||||
|
@ -306,7 +306,7 @@ for (;;) {
|
|||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
When used as an edge-triggered interface, for performance reasons, it is
|
||||
|
@ -493,13 +493,13 @@ You must consider it ready until the next (nonblocking)
|
|||
read/write yields
|
||||
.BR EAGAIN .
|
||||
When and how you will use the file descriptor is entirely up to you.
|
||||
.sp
|
||||
.IP
|
||||
For packet/token-oriented files (e.g., datagram socket,
|
||||
terminal in canonical mode),
|
||||
the only way to detect the end of the read/write I/O space
|
||||
is to continue to read/write until
|
||||
.BR EAGAIN .
|
||||
.sp
|
||||
.IP
|
||||
For stream-oriented files (e.g., pipe, FIFO, stream socket), the
|
||||
condition that the read/write I/O space is exhausted can also be detected by
|
||||
checking the amount of data read from / written to the target file
|
||||
|
|
Loading…
Reference in New Issue