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_STR2FLTSET 3PROC
16.Os
17.Sh NAME
18.Nm proc_str2fltset ,
19.Nm proc_str2sigset ,
20.Nm proc_str2sysset
21.Nd convert a string to a fault, signal, or system call set
22.Sh LIBRARY
23.Lb libproc
24.Sh SYNOPSIS
25.In libproc.h
26.Ft char *
27.Fo proc_str2fltset
28.Fa "const char *str"
29.Fa "const char *delim"
30.Fa "int members"
31.Fa "fltset_t *set"
32.Fc
33.Ft char *
34.Fo proc_str2sigset
35.Fa "const char *str"
36.Fa "const char *delim"
37.Fa "int members"
38.Fa "sigset_t *set"
39.Fc
40.Ft char *
41.Fo proc_str2sysset
42.Fa "const char *str"
43.Fa "const char *delim"
44.Fa "int members"
45.Fa "sysset_t *set"
46.Fc
47.Sh DESCRIPTION
48The
49.Fn proc_str2fltset ,
50.Fn proc_str2sigset ,
51and
52.Fn proc_str2sysset
53functions translate a character string,
54.Fa str ,
55into the corresponding fault set, signal set, and system call set
56respectively.
57.Pp
58The character string
59.Fa delim
60will be used as a delimiter between subsequent entries in the string
61.Fa set .
62The value of
63.Fa members
64determines whether the entries in
65.Fa str
66enable or disable entries in
67.Fa set .
68If
69.Fa members
70is zero, then
71.Fa set
72is filled in entirely and then each entry in
73.Fa str
74causes the corresponding entry to be disabled in
75.Fa set.
76If
77.Fa members
78is non-zero, then
79.Fa set
80is empty initially and for each entry in
81.Fa str
82the corresponding entry in
83.Fa set
84will be enabled.
85.Pp
86If an unknown entry is encountered in
87.Fa str
88then the conversion will fail and a pointer to the first unknown
89character will be returned.
90.Sh RETURN VALUES
91Upon successful completion,
92.Dv NULL
93is returned and
94.Fa set
95is filled in.
96Otherwise, a pointer to the first unknown character is returned and
97.Sy errno
98is set to indicate the error.
99.Sh ERRORS
100The
101.Fn proc_str2fltset ,
102.Fn proc_str2sigset ,
103and
104.Fn proc_str2sigset
105functions will fail if:
106.Bl -tag -width Er
107.It Er EINVAL
108.Fa str
109contains an unrecognized set name.
110.El
111.Sh INTERFACE STABILITY
112.Sy Uncommitted
113.Sh MT-LEVEL
114.Sy MT-Safe
115.Sh SEE ALSO
116.Xr libproc 3LIB ,
117.Xr proc_fltname 3PROC ,
118.Xr proc_fltset2str 3PROC ,
119.Xr proc_signame 3PROC ,
120.Xr proc_sigset2str 3PROC ,
121.Xr proc_str2flt 3PROC ,
122.Xr proc_str2sig 3PROC ,
123.Xr proc_str2sys 3PROC ,
124.Xr proc_sysname 3PROC ,
125.Xr proc_sysset2str 3PROC ,
126.Xr proc 5
127