2 .\" Copyright (c) 2006, Sun Microsystems, Inc.,
3 .\" All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH PROC_SIGNAL 9F "Jan 16, 2006"
9 proc_signal, proc_ref, proc_unref \- send a signal to a process
14 #include <sys/sunddi.h>
15 #include <sys/signal.h>
19 \fBvoid *\fR\fBproc_ref\fR(void)
24 \fBvoid\fR\fBproc_unref\fR(\fBvoid\fR \fI*pref\fR);
29 \fBint\fR \fBproc_signal\fR(\fBvoid\fR \fI*pref\fR, \fBint\fR \fIsig\fR);
35 Solaris DDI specific (Solaris DDI).
43 A handle for the process to be signalled.
52 Signal number to be sent to the process.
58 This set of routines allows a driver to send a signal to a process. The routine
59 \fBproc_ref()\fR is used to retrieve an unambiguous reference to the process
60 for signalling purposes. The return value can be used as a unique handle on the
61 process, even if the process dies. Because system resources are committed to a
62 process reference, \fBproc_unref()\fR should be used to remove it as soon as it
63 is no longer needed.\fBproc_signal()\fR is used to send signal \fIsig\fR to the
64 referenced process. The following set of signals may be sent to a process from
72 The device has been disconnected.
81 The interrupt character has been received.
90 The quit character has been received.
99 A pollable event has occurred.
108 Kill the process (cannot be caught or ignored).
126 Urgent data are available.
131 See \fBsignal.h\fR(3HEAD) for more details on the meaning of these signals.
134 If the process has exited at the time the signal was sent, \fBproc_signal()\fR
135 returns an error code; the caller should remove the reference on the process by
136 calling \fBproc_unref()\fR.
139 The driver writer must ensure that for each call made to \fBproc_ref()\fR,
140 there is exactly one corresponding call to \fBproc_unref()\fR.
144 The \fBproc_ref()\fR returns the following:
151 An opaque handle used to refer to the current process.
156 The \fBproc_signal()\fR returns the following:
163 The process existed before the signal was sent.
172 The process no longer exists; no signal was sent.
178 The \fBproc_unref()\fR and \fBproc_signal()\fR functions can be called from
179 user, interrupt, or kernel context. The \fBproc_ref()\fR function should be
180 called only from user context.
184 \fBsignal.h\fR(3HEAD), \fBputnextctl1\fR(9F)
187 \fIWriting Device Drivers\fR