s/current process/calling process/

This commit is contained in:
Michael Kerrisk 2007-12-27 16:06:35 +00:00
parent edd1fa35e3
commit a1ffe9f5a2
32 changed files with 58 additions and 56 deletions

View File

@ -28,7 +28,7 @@
.\" .\"
.TH _EXIT 2 2007-07-26 "Linux" "Linux Programmer's Manual" .TH _EXIT 2 2007-07-26 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
_exit, _Exit \- terminate the current process _exit, _Exit \- terminate the calling process
.SH SYNOPSIS .SH SYNOPSIS
.B #include <unistd.h> .B #include <unistd.h>
.sp .sp

View File

@ -42,7 +42,7 @@ chroot \- change root directory
changes the root directory to that specified in changes the root directory to that specified in
.IR path . .IR path .
This directory will be used for pathnames beginning with \fI/\fP. This directory will be used for pathnames beginning with \fI/\fP.
The root directory is inherited by all children of the current process. The root directory is inherited by all children of the calling process.
Only a privileged process (Linux: one with the Only a privileged process (Linux: one with the
.B CAP_SYS_CHROOT .B CAP_SYS_CHROOT

View File

@ -35,10 +35,10 @@ getgid, getegid \- get group identity
.B gid_t getegid(void); .B gid_t getegid(void);
.SH DESCRIPTION .SH DESCRIPTION
.BR getgid () .BR getgid ()
returns the real group ID of the current process. returns the real group ID of the calling process.
.BR getegid () .BR getegid ()
returns the effective group ID of the current process. returns the effective group ID of the calling process.
.SH ERRORS .SH ERRORS
These functions are always successful. These functions are always successful.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -33,12 +33,12 @@ getpid, getppid \- get process identification
.B pid_t getppid(void); .B pid_t getppid(void);
.SH DESCRIPTION .SH DESCRIPTION
.BR getpid () .BR getpid ()
returns the process ID of the current process. returns the process ID of the calling process.
(This is often used by (This is often used by
routines that generate unique temporary filenames.) routines that generate unique temporary filenames.)
.BR getppid () .BR getppid ()
returns the process ID of the parent of the current process. returns the process ID of the parent of the calling process.
.SH ERRORS .SH ERRORS
These functions are always successful. These functions are always successful.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -48,7 +48,7 @@ of either
.B RUSAGE_SELF .B RUSAGE_SELF
or or
.BR RUSAGE_CHILDREN . .BR RUSAGE_CHILDREN .
The former asks for resources used by the current process, The former asks for resources used by the calling process,
the latter for resources used by those of its children the latter for resources used by those of its children
that have terminated and have been waited for. that have terminated and have been waited for.
.PP .PP

View File

@ -55,7 +55,7 @@ is set appropriately.
.B EPERM .B EPERM
A process with process ID A process with process ID
.I p .I p
exists, but it is not in the same session as the current process, exists, but it is not in the same session as the calling process,
and the implementation considers this an error. and the implementation considers this an error.
.TP .TP
.B ESRCH .B ESRCH

View File

@ -32,7 +32,7 @@ gettid \- get thread identification
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.BR gettid () .BR gettid ()
returns the thread ID of the current process. returns the thread ID of the calling process.
This is equal This is equal
to the process ID (as returned by to the process ID (as returned by
.BR getpid (2)), .BR getpid (2)),
@ -45,7 +45,7 @@ system call).
All processes in the same thread group All processes in the same thread group
have the same PID, but each one has a unique TID. have the same PID, but each one has a unique TID.
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, returns the thread ID of the current process. On success, returns the thread ID of the calling process.
.SH ERRORS .SH ERRORS
This call is always successful. This call is always successful.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -36,10 +36,10 @@ getuid, geteuid \- get user identity
.B uid_t geteuid(void); .B uid_t geteuid(void);
.SH DESCRIPTION .SH DESCRIPTION
.BR getuid () .BR getuid ()
returns the real user ID of the current process. returns the real user ID of the calling process.
.BR geteuid () .BR geteuid ()
returns the effective user ID of the current process. returns the effective user ID of the calling process.
.SH ERRORS .SH ERRORS
These functions are always successful. These functions are always successful.
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -39,7 +39,7 @@ iopl \- change I/O privilege level
.BI "int iopl(int " level ); .BI "int iopl(int " level );
.SH DESCRIPTION .SH DESCRIPTION
.BR iopl () .BR iopl ()
changes the I/O privilege level of the current process, as specified in changes the I/O privilege level of the calling process, as specified in
.IR level . .IR level .
This call is necessary to allow 8514-compatible X servers to run under This call is necessary to allow 8514-compatible X servers to run under

View File

@ -69,7 +69,7 @@ can be used to send any signal to any process group or process.
If \fIpid\fP is positive, then signal \fIsig\fP is sent to \fIpid\fP. If \fIpid\fP is positive, then signal \fIsig\fP is sent to \fIpid\fP.
.PP .PP
If \fIpid\fP equals 0, then \fIsig\fP is sent to every process in the If \fIpid\fP equals 0, then \fIsig\fP is sent to every process in the
process group of the current process. process group of the calling process.
.PP .PP
If \fIpid\fP equals \-1, then \fIsig\fP is sent to every process If \fIpid\fP equals \-1, then \fIsig\fP is sent to every process
for which the calling process has permission to send signals, for which the calling process has permission to send signals,
@ -124,10 +124,10 @@ This is done to assure the
system is not brought down accidentally. system is not brought down accidentally.
.LP .LP
POSIX.1-2001 requires that \fIkill(\-1,sig)\fP send \fIsig\fP POSIX.1-2001 requires that \fIkill(\-1,sig)\fP send \fIsig\fP
to all processes that the current process may send signals to, to all processes that the calling process may send signals to,
except possibly for some implementation-defined system processes. except possibly for some implementation-defined system processes.
Linux allows a process to signal itself, but on Linux the call Linux allows a process to signal itself, but on Linux the call
\fIkill(\-1,sig)\fP does not signal the current process. \fIkill(\-1,sig)\fP does not signal the calling process.
.LP .LP
POSIX.1-2001 requires that if a process sends a signal to itself, POSIX.1-2001 requires that if a process sends a signal to itself,
and the sending thread does not have the signal blocked, and the sending thread does not have the signal blocked,

View File

@ -51,7 +51,7 @@ equals 0xffffffff.
Otherwise, it will make the execution domain Otherwise, it will make the execution domain
referenced by referenced by
.I persona .I persona
the new execution domain of the current process. the new execution domain of the calling process.
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, the previous On success, the previous
.I persona .I persona

View File

@ -352,10 +352,10 @@ to terminate it.
.B PTRACE_ATTACH .B PTRACE_ATTACH
Attaches to the process specified in Attaches to the process specified in
.IR pid , .IR pid ,
making it a traced "child" of the current process; making it a traced "child" of the calling process;
the behavior of the child is as if it had done a the behavior of the child is as if it had done a
.BR PTRACE_TRACEME . .BR PTRACE_TRACEME .
The current process actually becomes the parent of the child The calling process actually becomes the parent of the child
process for most purposes (e.g., it will receive process for most purposes (e.g., it will receive
notification of child events and appears in notification of child events and appears in
.BR ps (1) .BR ps (1)

View File

@ -50,7 +50,7 @@ sched_setparam, sched_getparam \- set and get scheduling parameters
sets the scheduling parameters associated with the scheduling policy sets the scheduling parameters associated with the scheduling policy
for the process identified by \fIpid\fP. for the process identified by \fIpid\fP.
If \fIpid\fP is zero, then If \fIpid\fP is zero, then
the parameters of the current process are set. the parameters of the calling process are set.
The interpretation of The interpretation of
the parameter \fIparam\fP depends on the scheduling the parameter \fIparam\fP depends on the scheduling
policy of the process identified by policy of the process identified by
@ -63,7 +63,7 @@ for a description of the scheduling policies supported under Linux.
retrieves the scheduling parameters for the retrieves the scheduling parameters for the
process identified by \fIpid\fP. process identified by \fIpid\fP.
If \fIpid\fP is zero, then the parameters If \fIpid\fP is zero, then the parameters
of the current process are retrieved. of the calling process are retrieved.
.BR sched_setparam () .BR sched_setparam ()
checks the validity of \fIparam\fP for the scheduling policy of the checks the validity of \fIparam\fP for the scheduling policy of the

View File

@ -123,7 +123,7 @@ priority range for a scheduling policy in a portable way on all
POSIX.1-2001 conforming systems. POSIX.1-2001 conforming systems.
All scheduling is preemptive: If a process with a higher static All scheduling is preemptive: If a process with a higher static
priority gets ready to run, the current process will be preempted and priority gets ready to run, the calling process will be preempted and
returned into its wait list. returned into its wait list.
The scheduling policy only determines the The scheduling policy only determines the
ordering within the list of runnable processes with equal static ordering within the list of runnable processes with equal static

View File

@ -40,7 +40,7 @@ A process can relinquish the processor voluntarily without blocking by calling
The process will then be moved to the end of the queue for its static The process will then be moved to the end of the queue for its static
priority and a new process gets to run. priority and a new process gets to run.
Note: If the current process is the only process in the highest Note: If the calling process is the only process in the highest
priority list at that time, this process will continue to run after a priority list at that time, this process will continue to run after a
call to call to
.BR sched_yield (). .BR sched_yield ().

View File

@ -48,7 +48,7 @@ _BSD_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600
.ad b .ad b
.SH DESCRIPTION .SH DESCRIPTION
.BR seteuid () .BR seteuid ()
sets the effective user ID of the current process. sets the effective user ID of the calling process.
Unprivileged user processes may only set the effective user ID to the Unprivileged user processes may only set the effective user ID to the
real user ID, the effective user ID or the saved set-user-ID. real user ID, the effective user ID or the saved set-user-ID.
@ -58,6 +58,8 @@ with "group" instead of "user".
.\" When .\" When
.\" .I euid .\" .I euid
.\" equals \-1, nothing is changed. .\" equals \-1, nothing is changed.
.\" (This is an artifact of the implementation in glibc of seteuid()
.\" using setresuid(2).)
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, zero is returned. On success, zero is returned.
On error, \-1 is returned, and On error, \-1 is returned, and
@ -68,7 +70,7 @@ is set appropriately.
.\" .B EINVAL .\" .B EINVAL
.TP .TP
.B EPERM .B EPERM
The current process is not privileged (Linux: does not have the The calling process is not privileged (Linux: does not have the
.B CAP_SETUID .B CAP_SETUID
capability in the case of capability in the case of
.BR seteuid (), .BR seteuid (),
@ -96,7 +98,7 @@ Under libc4, libc5 and glibc 2.0
is equivalent to is equivalent to
.BI setreuid(\-1, " euid" ) .BI setreuid(\-1, " euid" )
and hence may change the saved set-user-ID. and hence may change the saved set-user-ID.
Under glibc2.1 it is equivalent to Under glibc 2.1 iand later it is equivalent to
.BI setresuid(\-1, " euid" ", \-1)" .BI setresuid(\-1, " euid" ", \-1)"
and hence does not change the saved set-user-ID. and hence does not change the saved set-user-ID.
Similar remarks hold for Similar remarks hold for

View File

@ -35,7 +35,7 @@ setgid \- set group identity
.BI "int setgid(gid_t " gid ); .BI "int setgid(gid_t " gid );
.SH DESCRIPTION .SH DESCRIPTION
.BR setgid () .BR setgid ()
sets the effective group ID of the current process. sets the effective group ID of the calling process.
If the caller is the If the caller is the
superuser, the real GID and saved set-group-ID are also set. superuser, the real GID and saved set-group-ID are also set.

View File

@ -97,7 +97,7 @@ to
.IR pgid . .IR pgid .
If If
.I pid .I pid
is zero, the process ID of the current process is used. is zero, the process ID of the calling process is used.
If If
.I pgid .I pgid
is zero, the process ID of the process specified by is zero, the process ID of the process specified by
@ -125,7 +125,7 @@ returns the PGID of the process specified by
.IR pid . .IR pid .
If If
.I pid .I pid
is zero, the process ID of the current process is used. is zero, the process ID of the calling process is used.
(Retrieving the PGID of a process other than the caller is rarely (Retrieving the PGID of a process other than the caller is rarely
necessary, and the POSIX.1 necessary, and the POSIX.1
.BR getpgrp () .BR getpgrp ()
@ -208,7 +208,7 @@ does not match any process.
For For
.BR setpgid (): .BR setpgid ():
.I pid .I pid
is not the current process and not a child of the current process. is not the calling process and not a child of the calling process.
.SH "CONFORMING TO" .SH "CONFORMING TO"
.BR setpgid () .BR setpgid ()
and the version of and the version of

View File

@ -37,7 +37,7 @@ setresuid, setresgid \- set real, effective and saved user or group ID
.SH DESCRIPTION .SH DESCRIPTION
.BR setresuid () .BR setresuid ()
sets the real user ID, the effective user ID, and the sets the real user ID, the effective user ID, and the
saved set-user-ID of the current process. saved set-user-ID of the calling process.
Unprivileged user processes Unprivileged user processes
may change the real UID, may change the real UID,
@ -58,7 +58,7 @@ value as the (possibly new) effective UID.
Completely analogously, Completely analogously,
.BR setresgid () .BR setresgid ()
sets the real GID, effective GID, and saved set-group-ID sets the real GID, effective GID, and saved set-group-ID
of the current process (and always modifies the file system GID of the calling process (and always modifies the file system GID
to be the same as the effective GID), to be the same as the effective GID),
with the same restrictions for non-privileged processes. with the same restrictions for non-privileged processes.
.SH "RETURN VALUE" .SH "RETURN VALUE"

View File

@ -62,7 +62,7 @@ Feature Test Macro Requirements for glibc (see
_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
.SH DESCRIPTION .SH DESCRIPTION
.BR setreuid () .BR setreuid ()
sets real and effective user IDs of the current process. sets real and effective user IDs of the calling process.
Supplying a value of \-1 for either the real or effective user ID forces Supplying a value of \-1 for either the real or effective user ID forces
the system to leave that ID unchanged. the system to leave that ID unchanged.
@ -83,7 +83,7 @@ the saved set-user-ID will be set to the new effective user ID.
Completely analogously, Completely analogously,
.BR setregid () .BR setregid ()
sets real and effective group ID's of the current process, sets real and effective group ID's of the calling process,
and all of the above holds with "group" instead of "user". and all of the above holds with "group" instead of "user".
.SH "RETURN VALUE" .SH "RETURN VALUE"
On success, zero is returned. On success, zero is returned.
@ -93,7 +93,7 @@ is set appropriately.
.SH ERRORS .SH ERRORS
.TP .TP
.B EPERM .B EPERM
The current process is not privileged The calling process is not privileged
(Linux: does not have the (Linux: does not have the
.B CAP_SETUID .B CAP_SETUID
capability in the case of capability in the case of

View File

@ -36,7 +36,7 @@ setuid \- set user identity
.BI "int setuid(uid_t " uid ); .BI "int setuid(uid_t " uid );
.SH DESCRIPTION .SH DESCRIPTION
.BR setuid () .BR setuid ()
sets the effective user ID of the current process. sets the effective user ID of the calling process.
If the effective UID of the caller is root, If the effective UID of the caller is root,
the real UID and saved set-user-ID are also set. the real UID and saved set-user-ID are also set.
.PP .PP
@ -98,7 +98,7 @@ Linux has the concept of filesystem user ID, normally equal to the
effective user ID. effective user ID.
The The
.BR setuid () .BR setuid ()
call also sets the filesystem user ID of the current process. call also sets the filesystem user ID of the calling process.
See See
.BR setfsuid (2). .BR setfsuid (2).
.PP .PP

View File

@ -112,7 +112,7 @@ is not, in fact, a directory.
.B EPERM .B EPERM
The system does not allow unlinking of directories, The system does not allow unlinking of directories,
or unlinking of directories requires privileges that the or unlinking of directories requires privileges that the
current process doesn't have. calling process doesn't have.
(This is the POSIX prescribed error return; (This is the POSIX prescribed error return;
as noted above, Linux returns as noted above, Linux returns
.B EISDIR .B EISDIR

View File

@ -93,7 +93,7 @@ calls is termed
.SS "wait() and waitpid()" .SS "wait() and waitpid()"
The The
.BR wait () .BR wait ()
system call suspends execution of the current process until one of its system call suspends execution of the calling process until one of its
children terminates. children terminates.
The call The call
.I wait(&status) .I wait(&status)
@ -105,7 +105,7 @@ is equivalent to:
The The
.BR waitpid () .BR waitpid ()
system call suspends execution of the current process until a system call suspends execution of the calling process until a
child specified by child specified by
.I pid .I pid
argument has changed state. argument has changed state.

View File

@ -79,7 +79,7 @@ returned by
.BR openpty ()) .BR openpty ())
by creating a new session, making by creating a new session, making
.I fd .I fd
the controlling terminal for the current process, setting the controlling terminal for the calling process, setting
.I fd .I fd
to be the standard input, output, and error streams of the current to be the standard input, output, and error streams of the current
process, and closing process, and closing
@ -135,7 +135,7 @@ will fail if
.BR ioctl (2) .BR ioctl (2)
fails to set fails to set
.I fd .I fd
to the controlling terminal of the current process. to the controlling terminal of the calling process.
.LP .LP
.BR forkpty () .BR forkpty ()
will fail if either will fail if either

View File

@ -25,7 +25,7 @@
.\" .\"
.TH RAISE 3 1995-08-31 "GNU" "Linux Programmer's Manual" .TH RAISE 3 1995-08-31 "GNU" "Linux Programmer's Manual"
.SH NAME .SH NAME
raise \- send a signal to the current process raise \- send a signal to the calling process
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B #include <signal.h> .B #include <signal.h>
@ -35,7 +35,7 @@ raise \- send a signal to the current process
.SH DESCRIPTION .SH DESCRIPTION
The The
.BR raise () .BR raise ()
function sends a signal to the current process. function sends a signal to the calling process.
It is equivalent to It is equivalent to
.sp .sp
.RS .RS

View File

@ -41,7 +41,7 @@ The initial mask is such that logging is enabled for all priorities.
.LP .LP
The The
.BR setlogmask () .BR setlogmask ()
function sets this logmask for the current process, function sets this logmask for the calling process,
and returns the previous mask. and returns the previous mask.
If the mask argument is 0, the current logmask is not modified. If the mask argument is 0, the current logmask is not modified.
.LP .LP

View File

@ -32,7 +32,7 @@ sleep \- Sleep for the specified number of seconds
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.BR sleep () .BR sleep ()
makes the current process sleep until makes the calling process sleep until
.I seconds .I seconds
seconds have elapsed or a signal arrives which is not ignored. seconds have elapsed or a signal arrives which is not ignored.
.SH "RETURN VALUE" .SH "RETURN VALUE"

View File

@ -96,7 +96,7 @@ call to find the number of the line in
.SS "The semantics of ttyslot" .SS "The semantics of ttyslot"
Thus, the function Thus, the function
.BR ttyslot () .BR ttyslot ()
returns the index of the controlling terminal of the current process returns the index of the controlling terminal of the calling process
in the file in the file
.IR /etc/ttys , .IR /etc/ttys ,
and that is (usually) the same as the index of the entry for the and that is (usually) the same as the index of the entry for the

View File

@ -46,7 +46,7 @@ see
The The
.BR ulimit () .BR ulimit ()
call will get or set some limit for the current process. call will get or set some limit for the calling process.
The The
.I cmd .I cmd
argument can have one of the following values. argument can have one of the following values.

View File

@ -38,7 +38,7 @@ requests supported by the device that
.BR ioctl (2) .BR ioctl (2)
request \fBTIOCNOTTY\fP is supported. request \fBTIOCNOTTY\fP is supported.
.SS TIOCNOTTY .SS TIOCNOTTY
Detach the current process from its controlling terminal. Detach the calling process from its controlling terminal.
.sp .sp
If the process is the session leader, If the process is the session leader,
then then

View File

@ -220,8 +220,8 @@ or
.SS "Controlling tty" .SS "Controlling tty"
.TP .TP
.BI "TIOCSCTTY int " arg .BI "TIOCSCTTY int " arg
Make the given tty the controlling tty of the current process. Make the given tty the controlling tty of the calling process.
The current process must be a session leader and not have a The calling process must be a session leader and not have a
controlling tty already. controlling tty already.
If this tty is already the controlling tty If this tty is already the controlling tty
of a different session group then the ioctl fails with of a different session group then the ioctl fails with
@ -232,7 +232,7 @@ equals 1, in which case the tty is stolen, and all processes that had
it as controlling tty lose it. it as controlling tty lose it.
.TP .TP
.B TIOCNOTTY void .B TIOCNOTTY void
If the given tty was the controlling tty of the current process, If the given tty was the controlling tty of the calling process,
give up this controlling tty. give up this controlling tty.
If the process was session leader, If the process was session leader,
then send then send

View File

@ -28,7 +28,7 @@ Some Unix/Linux system calls have as parameter one or more filenames.
A filename (or pathname) is resolved as follows. A filename (or pathname) is resolved as follows.
.SS "Step 1: Start of the resolution process" .SS "Step 1: Start of the resolution process"
If the pathname starts with the '/' character, the starting lookup directory If the pathname starts with the '/' character, the starting lookup directory
is the root directory of the current process. is the root directory of the calling process.
(A process inherits its (A process inherits its
root directory from its parent. root directory from its parent.
Usually this will be the root directory Usually this will be the root directory
@ -169,11 +169,11 @@ The permission bits of a file consist of three groups of three bits, cf.\&
and and
.BR stat (2). .BR stat (2).
The first group of three is used when the effective user ID of The first group of three is used when the effective user ID of
the current process equals the owner ID of the file. the calling process equals the owner ID of the file.
The second group The second group
of three is used when the group ID of the file either equals the of three is used when the group ID of the file either equals the
effective group ID of the current process, or is one of the effective group ID of the calling process, or is one of the
supplementary group IDs of the current process (as set by supplementary group IDs of the calling process (as set by
.BR setgroups (2)). .BR setgroups (2)).
When neither holds, the third group is used. When neither holds, the third group is used.