PROC_CONTENT2STR(3PROC) Process Control Library Functions PROC_CONTENT2STR(3PROC)

proc_content2str, proc_str2contentconvert a string to and from a core_content_t

Process Control Library (libproc, -lproc)

#include <libproc.h>

proc_content2str(core_content_t content, char *buf, size_t size);

proc_str2content(const char *str, core_content_t *cp);

The () 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 portion of the section in libproc(3LIB).

The () 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 . Otherwise, will be returned to indicate an unknown string.

libproc(3LIB), proc(5), coreadm(8)

November 27, 2023 OmniOS