1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified by Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de)
.\" Modified by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\" Modified Fri Jul 23 21:51:36 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Jul 25 10:53:24 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Wed Nov 01 18:56:43 1995 by Michael Haardt
.\" (michael@cantor.informatik.rwth-aachen.de)
.\"
.\" Traduction 10/10/1996 Christophe BLAESS (ccb@club-internet.fr)
.\" Mise a jour 23/01/97
.\" Mise a jour 8/04/97
.\" mj 10/12/1997 (LDP man-pages 1.18)
.TH KILL 2 "10 Dcembre 1997" "Linux 2.0.30" "Manuel du programmeur Linux"
.SH NOM
kill \- Envoyer un signal un processus.
.SH SYNOPSIS
.nf
.B #include <signal.h>
.sp
.BI "int kill(pid_t " pid ", int " sig );
.fi
.SH DESCRIPTION
\fBkill()\fP
peut tre utilis pour envoyer n'importe quel signal n'importe
quel processus ou groupe de processus.
.PP
Si \fIpid\fP est positif, le signal \fIsig\fP est envoy au processus \fIpid\fP.
.PP
Si \fIpid\fP vaut zro, alors le signal \fIsig\fP est envoy tous les processus
appartenant au mme groupe que le processus appelant.
.PP
Si \fIpid\fP vaut \-1, alors le signal \fIsig\fP est envoy tous les
processus sauf le premier (init) dans l'ordre dcroissant des numros
dans la table des processus (par ex: shutdown envoie le signal SIGTERM
tous les processus).
.PP
Si \fIpid\fP est infrieur \-1, alors le signal \fIsig\fP
est envoy tous les processus du groupe \fI\-pid\fP.
.SH "VALEUR RENVOYE"
En cas de russite 0 est renvoy,
en cas d'chec \-1 est renvoy et
.I errno
contient le code d'erreur.
.SH ERREURS
.TP
.B EINVAL
Numro de signal invalide.
.TP
.B ESRCH
Le processus ou le groupe de processus n'existe pas.
Remarquez qu'un processus existant peut tre un zombie,
c'est dire qu'il s'est dj termin mais que son pre n'a pas
encore lu sa valeur de retour avec \fBwait()\fP.
.TP
.B EPERM
Le processus appelant n'a pas l'autorisation d'envoyer un
signal l'un des processus concerns. Pour qu'un processus
ait le droit d'envoyer un signal un autre processus
.I pid
il doit avoir des privilges de Super-Utilisateur,
ou avoir un UID rel ou effectif gal l'ID rel ou sauvegard
du processus recepteur.
.SH "BUGS"
On ne peut pas envoyer de signal au processus numro un (init), qui ne
dispose pas de routine de gestion de signaux.
Ceci vite que le systme soit arrt accidentellement.
.SH "CONFORMIT"
SVr4, AT&T, POSIX.1, X/OPEN, BSD 4.3
.SH "VOIR AUSSI"
.BR _exit (2),
.BR exit (2),
.BR signal (2),
.BR signal (7).
.SH TRADUCTION
Christophe Blaess, 1997.
|