kill man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



KILL(3B)							      KILL(3B)

NAME
     kill - send signal to a process (4.3BSD)

SYNOPSIS
     #include <signal.h>

     int kill(pid_t pid, int sig);

     To use any of the BSD signal routines (kill(3B), killpg(3B),
     sigblock(3B), signal(3B), sigpause(3B), sigsetmask(3B), sigstack(2B),
     sigvec(3B)) you must either

     1) #define _BSD_SIGNALS or _BSD_COMPAT before including <signal.h>, or

     2) specify one of them in the compile command or makefile:

	  cc -D_BSD_SIGNALS -o prog prog.c

DESCRIPTION
     kill sends the signal sig to a process, specified by the process number
     pid.  Sig may be one of the signals specified in sigvec(3B), or it may be
     0, in which case error checking is performed but no signal is actually
     sent. This can be used to check the validity of pid.

     The sending and receiving processes must have the same effective user ID,
     otherwise this call is restricted to the super-user.  A single exception
     is the signal SIGCONT, which may always be sent to any descendant of the
     current process.

     If the process number is 0, the signal is sent to all processes in the
     sender's process group; this is a variant of killpg(3B).

     If the process number is -1 and the user is the super-user, the signal is
     broadcast universally except to system processes.	If the process number
     is -1 and the user is not the super-user, the signal is broadcast
     universally to all processes with the same uid as the user.  No error is
     returned if any process could be signaled.

     For compatibility with System V, if the process number is negative but
     not -1, the signal is sent to all processes whose process group ID is
     equal to the absolute value of the process number.	 This is a variant of
     killpg(3B).

     Processes may send signals to themselves.

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.

									Page 1

KILL(3B)							      KILL(3B)

ERRORS
     kill will fail and no signal will be sent if any of the following occur:

     [EINVAL]	    Sig is not a valid signal number.

     [ESRCH]	    No process can be found corresponding to that specified by
		    pid.

     [ESRCH]	    The process id was given as 0 but the sending process does
		    not have a process group.

     [EPERM]	    The sending process is not the super-user and its
		    effective user ID does not match the effective user ID of
		    the receiving process.

SEE ALSO
     getpid(2), getpgrp(2), killpg(3B), sigvec(3B)

CAVEATS (IRIX)
     When the process number is -1, the process sending the signal is NOT
     included in the delivery group.  In the IRIX implementation, the sending
     process receives the signal, too.

     4.3BSD's implementation of kill returns EPERM if any members of a process
     group can not be signaled (when kill is invoked with a pid of 0).	The
     IRIX implementation does not.

WARNING (IRIX)
     The 4.3BSD and System V signal facilities have different semantics.
     Using both facilities in the same program is strongly discouraged and
     will result in unpredictable behavior.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net