xref: /illumos-gate/usr/src/man/man3proc/Perror_printf.3proc (revision 201ceb75ab95f9bf1f42ea1dc9ab363b43ba47cf)
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 November 27, 2023
15.Dt PERROR_PRINTF 3PROC
16.Os
17.Sh NAME
18.Nm Perror_printf
19.Nd interposable function for additional diagnostics
20.Sh LIBRARY
21.Lb libproc
22.Sh SYNOPSIS
23.In libproc.h
24.Ft void
25.Fo Perror_printf
26.Fa "struct ps_prochandle *P"
27.Fa "const char *format"
28.Fa "..."
29.Fc
30.Sh DESCRIPTION
31The
32.Fn Perror_printf
33function allows for consumers of the
34.Sy libproc
35library to obtain additional diagnostic information during various
36operations.
37Consumers must explicitly
38.Em interpose
39on this symbol and provide their own definition, if desired.
40There is no requirement for such an interposition to be done.
41When called,
42.Fa P
43will be the process handle that the additional diagnostics are being
44generated for and the diagnostics will be provided in a
45.Xr printf 3C
46style.
47.Sh INTERFACE STABILITY
48.Sy Uncommitted
49.Pp
50While the interposing interface is
51.Sy uncommitted ,
52the provided diagnostics are
53.Sy Not-an-Interface
54and may change at any time.
55.Sh LOCKING
56Callers should presume that this function may be called from multiple
57threads and always in a context in which taking locks is fine.
58Callers should not expect to be called from a signal handler.
59.Sh SEE ALSO
60.Xr libproc 3LIB
61