Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kill(S) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(C)

getpid(S)

setpgrp(S)

signal(S)



     KILL(S)                  XENIX System V                   KILL(S)



     Name
          kill - Sends a signal to a process or a group of processes.

     Syntax
          #include <signal.h>

          int kill (pid, sig)
          int pid, 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 that is to be sent
          is specified by sig and is either one from the list given in
          signal(S), 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 effective user ID of the receiving process unless,
          the effective user ID of the sending process is super-user,
          or the process is sending to itself.

          The processes with a process ID of 0 and a process ID of 1
          are special processes (see intro(S)) and will be referred to
          below as proc0 and proc1 respectively.

          If pid is greater than zero, sig will be sent to the process
          whose process ID is equal to pid.  pid may equal 1.

          If pid is 0, sig will be sent to all processes excluding
          proc0 and proc1 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
          super-user, sig will be sent to all processes excluding
          proc0 and proc1 whose real user ID is equal to the effective
          user ID of the sender.

          If pid is -1 and the effective user ID of the sender is
          super-user, sig will be sent to all processes excluding
          proc0 and proc1.

          If pid is negative but not -1, sig will be sent to all
          processes whose process group ID is equal to the absolute
          value of pid.









     Page 1                                           (printed 8/7/87)





     KILL(S)                  XENIX System V                   KILL(S)



          kill will fail and no signal will be sent if one or more of
          the following are true:

               Sig is not a valid signal number.  [EINVAL]

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

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

     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.

     See Also
          kill(C), getpid(S), setpgrp(S), signal(S)



































     Page 2                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026