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