xref: /illumos-gate/usr/src/man/man3proc/proc_unctrl_psinfo.3proc (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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 8, 2020
15.Dt PROC_UNCTRL_PSINFO 3PROC
16.Os
17.Sh NAME
18.Nm proc_unctrl_psinfo
19.Nd fix unprintable characters in a psinfo structures
20.Sh SYNOPSIS
21.Lb libproc
22.In libproc.h
23.Ft void
24.Fo proc_unctrl_psinfo
25.Fa "psinfo_t *psp"
26.Fc
27.Sh DESCRIPTION
28The
29.Fn proc_unctrl_psinfo
30function walks the process arguments of the
31.Fa psp
32structure (the
33.Sy pr_psargs
34member) converting unprintable characters into spaces.
35The conversion continues until a null character is encountered.
36Note, this routine only will correctly handle 7-bit ASCII characters.
37Characters in other encodings, e.g. UTF-8, may be misinterpreted as unprintable.
38.Sh INTERFACE STABILITY
39.Sy Uncommitted
40.Sh MT-LEVEL
41.Sy MT-Safe
42with exceptions.
43.Pp
44Note, the
45.Fn proc_unctrl_psinfo
46function is
47.Sy UNSAFE
48if the same value for
49.Fa psp
50is passed in from multiple threads.
51.Sh SEE ALSO
52.Xr libproc 3LIB ,
53.Xr proc 4
54