xref: /illumos-gate/usr/src/man/man3proc/Perror_printf.3proc (revision 566b4223c74de6cad48ddbedf35a12d6a511c8c5)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PERROR_PRINTF 3PROC
16.Os
17.Sh NAME
18.Nm Perror_printf
19.Nd interposable function for additional diagnostics
20.Sh SYNOPSIS
21.Ft void
22.Fo Perror_printf
23.Fa "struct ps_prochandle *P"
24.Fa "const char *format"
25.Fa "..."
26.Fc
27.Sh DESCRIPTION
28The
29.Fn Perror_printf
30function allows for consumers of the
31.Sy libproc
32library to obtain additional diagnostic information during various
33operations.
34Consumers must explicitly
35.Em interpose
36on this symbol and provide their own definition, if desired.
37There is no requirement for such an interposition to be done.
38When called,
39.Fa P
40will be the process handle that the additional diagnostics are being
41generated for and the diagnostics will be provided in a
42.Xr printf 3C
43style.
44.Sh INTERFACE STABILITY
45.Sy Uncommitted
46.Pp
47While the interposing interface is
48.Sy uncommitted ,
49the provided diagnostics are
50.Sy Not-an-Interface
51and may change at any time.
52.Sh LOCKING
53Callers should presume that this function may be called from multiple
54threads and always in a context in which taking locks is fine.
55Callers should not expect to be called from a signal handler.
56.Sh SEE ALSO
57.Xr libproc 3LIB
58