📄 kill.2
字号:
.\" This -*- nroff -*- file has been generated from.\" DocBook SGML with docbook-to-man on Debian GNU/Linux....\"...\" transcript compatibility for postscript use....\"...\" synopsis: .P! <file.ps>...\".de P!\\&..fl \" force out current output buffer\\!%PB\\!/showpage{}def...\" the following is from Ken Flowers -- it prevents dictionary overflows\\!/tempdict 200 dict def tempdict begin.fl \" prolog.sy cat \\$1\" bring in postscript file...\" the following line matches the tempdict above\\!end % tempdict %\\!PE\\!..sp \\$2u \" move below the image...de pF.ie \\*(f1 .ds f1 \\n(.f.el .ie \\*(f2 .ds f2 \\n(.f.el .ie \\*(f3 .ds f3 \\n(.f.el .ie \\*(f4 .ds f4 \\n(.f.el .tm ? font overflow.ft \\$1...de fP.ie !\\*(f4 \{\. ft \\*(f4. ds f4\"' br \}.el .ie !\\*(f3 \{\. ft \\*(f3. ds f3\"' br \}.el .ie !\\*(f2 \{\. ft \\*(f2. ds f2\"' br \}.el .ie !\\*(f1 \{\. ft \\*(f1. ds f1\"' br \}.el .tm ? font underflow...ds f1\".ds f2\".ds f3\".ds f4\"'\" t .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "kill" "2" .SH "NAME" kill \(em (OBSOLETE, REMOVED) send signal to a process .SH "SYNOPSIS" .PP .nf .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n #include <sys/types.h> #include <signal.h> int \fBkill\fP pid_t \fBpid\fR, int sig); .fi .SH "DESCRIPTION" .PP OBSOLETE and REMOVED. USE PTHREAD_KILL. The \fBkill\fP system can be used to send any signal to any process group or process. In RTLinux there is a single process and a single process group for each processor. The process group and the process identifier for that processor is the cpu number + 1 (so that we can handle the stupid 0 convention described below). .PP If \fBpid\fR is positive, then signal \fBsig\fR is sent to \fBpid\fR. .PP If \fBpid\fR equals 0, then \fBsig\fR is sent to every process in the process group of the current process. This is equivalent to sending the signal to the current process in RTLinux. .PP If \fBpid\fR equals -1, then \fBsig\fR is sent to every process except for the first one, from higher numbers in the process table to lower. .PP If \fBpid\fR is less than -1, then \fBsig\fR is sent to every process in the process group \fB-pid\fR. .PP If \fBsig\fR is 0, then no signal is sent, but error checking is still performed. .SH "RETURN VALUE" .PP On success, zero is returned. On error, -1 is returned, and errno is set appropriately. .SH "ERRORS" .IP "EINVAL" 10 An invalid signal was specified. .IP "ESRCH" 10 The \fBpid\fR or process group does not exit. Note that an existing process might be a zombie -- a process which already committed termination, but has not yet been \fBwait()\fPed for. .IP "EPERM" 10 The process does not have permission to send the signal to any of the receiving processes. For a process to have permission to send a signal to process \fBpid\fR, it must either have root privileges, or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the receiving process. .SH "BUGS" .PP It is impossible to send a signal to task number one, the init process, for which it has not installed a signal handler. This is done to assure the system is not brought down accidentally. .SH "NOTES" .PP In RTLinux, process number one is not special--it is just the process on processor 0. In a single processor system this is the only process identifier. .SH "CONFORMING TO" .PP SVr4, SVID, POSIX.1, X/OPEN, BSD 4.3 .SH "SEE ALSO" \fIUNIX spec exit(2) (link to URL ../susv2/xsh/exit.html) \fR, \fIUNIX spec exit(3) (link to URL ../susv2/xsh/exit.html) \fR, \fIUNIX spec signal(2) (link to URL ../susv2/xsh/signal.html) \fR, \fIUNIX spec signal(7) (link to URL ../susv2/xsh/signal.html) \fR .PP \(co2001 FSMLabs Inc. .PP All rights reserved. ...\" created by instant / docbook-to-man, Wed 13 Jun 2001, 17:57
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -