DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

proc_ref(D3)


proc_ref -- obtain a reference to a process for signaling

Synopsis

   #include <sys/signal.h>
   #include <sys/ddi.h>

void *proc_ref(void);

Description

A non-STREAMS character driver can call proc_ref to obtain a reference to the process in whose context it is running.

Arguments

None

Return values

proc_ref returns an identifier that can be used in calls to proc_signal and proc_unref(D3).

Usage

The value returned can be used in subsequent calls to proc_signal(D3) to post a signal to the process. The return value should not be used in any other way (that is, the driver should not attempt to interpret its meaning).

Processes can exit even though they are referenced by drivers. In this event, reuse of the identifier is deferred until all driver references are given up.

There must be a matching call to proc_unref for every call to proc_ref, when the driver no longer needs to reference the process. This is typically done as part of close(D2) processing.

This function requires user context.

Context and synchronization

User context.

Hardware applicability

All

Version applicability

ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

proc_signal(D3), proc_unref(D3), proc_valid(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005