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