⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kill.2

📁 Unix操作系统minix 2.0源码
💻 2
字号:
.\" Copyright (c) 1980 Regents of the University of California..\" All rights reserved.  The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\"	@(#)kill.2	6.5 (Berkeley) 5/14/86.\".TH KILL 2 "May 14, 1986".UC 4.SH NAMEkill \- send signal to a process.SH SYNOPSIS.nf.ft B#include <sys/types.h>#include <signal.h>int kill(pid_t \fIpid\fP, int \fIsig\fP).ft R.fi.SH DESCRIPTION.B Killsends the signal \fIsig\fPto a process, specified by the process number.IR pid ..I Sigmay be one of the signals specified in.BR sigaction (2),or it may be 0, in which caseerror checking is performed but nosignal is actually sent. This can be used to check the validity of.IR pid ..PPThe sending and receiving processes musthave the same effective user ID, otherwisethis call is restricted to the super-user..igA single exception is the signal SIGCONT, which may always be sentto any descendant of the current process....PPIf the process number is 0,the signal is sent to all processes in thesender's process group..PPIf the process number is \-1and the user is the super-user,the signal is broadcast universallyexcept to.B initand the process sending the signal.If the process number is \-1and the user is not the super-user,the signal is broadcast universally toall processes with the same uid as the userexcept the process sending the signal.No error is returned if any process could be signaled..PPIf the process number is negative but not \-1,the signal is sent to all processes whose process group IDis equal to the absolute value of the process number..PPProcesses may send signals to themselves..SH "RETURN VALUEUpon successful completion, a value of 0 is returned.Otherwise, a value of \-1 is returned and.B errnois set to indicate the error..SH "ERRORS.B Killwill fail and no signal will be sent if any of the followingoccur:.TP 15[EINVAL]\fISig\fP is not a valid signal number..TP 15[ESRCH]No process can be found corresponding to that specified by \fIpid\fP..TP 15[ESRCH]The process id was given as 0but the sending process does not have a process group..TP 15[EPERM]The sending process is not the super-user and its effectiveuser id does not match the effective user-id of the receiving process.When signaling a process group, this error was returned if any membersof the group could not be signaled..SH "SEE ALSO".BR getpid (2),.BR getpgrp (2),.BR sigaction (2),.BR raise (3).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -