PROC_CONTENT2STR(3PROC) Process Control Library Functions
proc_content2str, proc_str2content - convert a string to and from a
core_content_t
Process Control Library (libproc, -lproc)
#include <libproc.h>
int
proc_content2str(core_content_t content, char *buf, size_t size);
int
proc_str2content(const char *str, core_content_t *cp);
The proc_content2str() function converts the contents of a process
(whether active or a core file) from content into a string and writes
up to size characters, including the null-terminator, into buf.
A content string will be a series of one or more tokens concatenated
together with the + or - characters, indicating that the subsequent
token should be added or subtracted from the previous ones. The full
list of tokens and constants is available in the core_content_t portion
of the TYPES section in libproc(3LIB).
The proc_str2content() function takes the character string str and
based on the format described in the previous paragraph, converts it
back into a core_content_t which is placed into cp.
Upon successful completion, the proc_content2str() function will return
the number of characters written into buf, excluding the terminating
null character.
Upon successful completion, the proc_str2content() function will return
0. Otherwise, -1 will be returned to indicate an unknown string.
Uncommitted
MT-LEVEL
MT-Safe
libproc(3LIB), proc(5), coreadm(8)
illumos November 27, 2023 illumos
NAME
proc_content2str, proc_str2content - convert a string to and from a
core_content_t
LIBRARY
Process Control Library (libproc, -lproc)
SYNOPSIS
#include <libproc.h>
int
proc_content2str(core_content_t content, char *buf, size_t size);
int
proc_str2content(const char *str, core_content_t *cp);
DESCRIPTION
The proc_content2str() function converts the contents of a process
(whether active or a core file) from content into a string and writes
up to size characters, including the null-terminator, into buf.
A content string will be a series of one or more tokens concatenated
together with the + or - characters, indicating that the subsequent
token should be added or subtracted from the previous ones. The full
list of tokens and constants is available in the core_content_t portion
of the TYPES section in libproc(3LIB).
The proc_str2content() function takes the character string str and
based on the format described in the previous paragraph, converts it
back into a core_content_t which is placed into cp.
RETURN VALUES
Upon successful completion, the proc_content2str() function will return
the number of characters written into buf, excluding the terminating
null character.
Upon successful completion, the proc_str2content() function will return
0. Otherwise, -1 will be returned to indicate an unknown string.
INTERFACE STABILITY
Uncommitted
MT-LEVEL
MT-Safe
SEE ALSO
libproc(3LIB), proc(5), coreadm(8)
illumos November 27, 2023 illumos