1proc_signal(9F)          Kernel Functions for Drivers          proc_signal(9F)
2
3
4

NAME

6       proc_signal, proc_ref, proc_unref - send a signal to a process
7

SYNOPSIS

9       #include <sys/ddi.h>
10       #include <sys/sunddi.h>
11       #include <sys/signal.h>
12
13
14
15       void *proc_ref(void)
16
17
18       voidproc_unref(void *pref);
19
20
21       int proc_signal(void *pref, int sig);
22
23

INTERFACE LEVEL

25       Solaris DDI specific (Solaris DDI).
26

PARAMETERS

28       pref    A handle for the process to be signalled.
29
30
31       sig     Signal number to be sent to the process.
32
33

DESCRIPTION

35       This set of routines allows a driver to send a signal to a process. The
36       routine proc_ref() is used to retrieve an unambiguous reference to  the
37       process  for  signalling  purposes.  The  return value can be used as a
38       unique handle on the process, even if the process dies. Because  system
39       resources  are committed to a process reference, proc_unref() should be
40       used to remove it as soon as it is no  longer  needed.proc_signal()  is
41       used to send signal sig to the referenced process. The following set of
42       signals may be sent to a process from a driver:
43
44       SIGHUP      The device has been disconnected.
45
46
47       SIGINT      The interrupt character has been received.
48
49
50       SIGQUIT     The quit character has been received.
51
52
53       SIGPOLL     A pollable event has occurred.
54
55
56       SIGKILL     Kill the process (cannot be caught or ignored).
57
58
59       SIGWINCH    Window size change.
60
61
62       SIGURG      Urgent data are available.
63
64
65
66       See signal.h(3HEAD) for more details on the meaning of these signals.
67
68
69       If the process has exited at the time the signal  was  sent,  proc_sig‐
70       nal()  returns an error code; the caller should remove the reference on
71       the process by calling proc_unref().
72
73
74       The driver writer must ensure that for each call  made  to  proc_ref(),
75       there is exactly one corresponding call to proc_unref().
76

RETURN VALUES

78       The proc_ref() returns the following:
79
80       pref    An opaque handle used to refer to the current process.
81
82
83
84       The proc_signal() returns the following:
85
86       0     The process existed before the signal was sent.
87
88
89       -1    The process no longer exists; no signal was sent.
90
91

CONTEXT

93       The  proc_unref()  and proc_signal() functions can be called from user,
94       interrupt, or kernel context. The proc_ref() function should be  called
95       only from user context.
96

SEE ALSO

98       signal.h(3HEAD), putnextctl1(9F)
99
100
101       Writing Device Drivers
102
103
104
105SunOS 5.11                        16 Jan 2006                  proc_signal(9F)
Impressum