HPUX kill[2]

kill in anderen Kapiteln des hpux Handbuch:
kill.3f
kill.1
kill(2) kill(2)
NAME
kill, raise - send a signal to a process or a group of processes
SYNOPSIS
#include <signal.h>
int kill(pid_t pid, int sig);
int raise(int sig);
DESCRIPTION
kill() sends a signal to a process or a group of processes. The
process or group of processes to which the signal is to be sent is
specified by pid. The signal to be sent is specified by sig and is
either one from the list given in signal(2), or 0.
raise() sends signal sig to the executing program. The signal to be
sent is specified by sig and is either one from the list given in
signal(2), or 0.
If sig is 0 (the null signal), error checking is performed but no
signal is actually sent. This can be used to check the validity of
pid.
The real or effective user ID of the sending process must match the
real or saved user ID of the receiving process unless the effective
user ID of the sending process is a user who has appropriate
privileges. As a single special case, the continue signal SIGCONT can
be sent to any process that is a member of the same session as the
sending process.
The value KILL_ALL_OTHERS is defined in the file <sys/signal.h> and is
guaranteed not to be the ID of any process in the system or the
negation of the ID of any process in the system.
If pid is greater than zero and not equal to KILL_ALL_OTHERS, sig is
sent to the process whose process ID is equal to pid. pid can equal 1
unless sig is SIGKILL or SIGSTOP.
If pid is 0, sig is sent to all processes excluding special system
processes whose process group ID is equal to the process group ID of
the sender.
If pid is -1 and the effective user ID of the sender is not a user who
has appropriate privileges. sig is sent to all processes excluding
special system processes whose real or saved user ID is equal to the
real or effective user ID of the sender.
If pid is -1 and the effective user ID of the sender is a user who has
appropriate privileges, sig is sent to all processes excluding special
system processes.
Hewlett-Packard Company - 1 - HP-UX Release 9.0: August 1992
kill(2) kill(2)
If pid is KILL_ALL_OTHERS, kill() behaves much as when pid is equal to
-1, except that sig is not sent to the calling process.
If pid is negative but not -1 or KILL_ALL_OTHERS, sig is sent to all
processes (excluding special system processes) whose process group ID
is equal to the absolute value of pid, and whose real and/or effective
user ID meets the constraints described above for matching user IDs.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a
value of -1 is returned and errno is set to indicate the error.
ERRORS
kill() fails and no signal is sent if one or more of the following is
true:
[EINVAL] sig is neither a valid signal number nor zero.
[EINVAL] sig is SIGKILL or SIGSTOP and pid is 1 (proc1).
[EPERM] The user ID of the sending process is not a user
who has appropriate privileges and its real or
effective user ID does not match the real or saved
user ID of the receiving process.
[EPERM] The sending and receiving processes are not in the
same session.
[ESRCH] No process or process group can be found
corresponding to that specified by pid.
raise() fails and no signal is sent if the following is true:
[EINVAL] sig is not a valid signal number or zero.
AUTHOR
kill() was developed by HP, AT&T, and the University of California,
Berkeley.
SEE ALSO
kill(1), getpid(2), setpgrp(2), signal(2), privilege(5).
STANDARDS CONFORMANCE
kill(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
raise(): AES, XPG4, ANSI C
Hewlett-Packard Company - 2 - HP-UX Release 9.0: August 1992