xref: /illumos-gate/usr/src/man/man3proc/proc_str2flt.3proc (revision c093b3ec6d35e1fe023174ed7f6ca6b90690d526)
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_STR2FLT 3PROC
16.Os
17.Sh NAME
18.Nm proc_str2flt ,
19.Nm proc_str2sig ,
20.Nm proc_str2sys
21.Nd convert a string to a fault, signal, or system call
22.Sh LIBRARY
23.Lb libproc
24.Sh SYNOPSIS
25.In libproc.h
26.Ft int
27.Fo proc_str2flt
28.Fa "const char *str"
29.Fa "int *fltnum"
30.Fc
31.Ft int
32.Fo proc_str2sig
33.Fa "const char *str"
34.Fa "int *signum"
35.Fc
36.Ft int
37.Fo proc_str2sys
38.Fa "const char *sys"
39.Fa "int *sysnum"
40.Fc
41.Sh DESCRIPTION
42The
43.Fn proc_str2flt ,
44.Fn proc_str2sig ,
45and
46.Fn proc_str2sys
47functions convert a string into the corresponding fault, signal, and
48system call number respectively and stores the resulting value in
49.Fa fltnum ,
50.Fa signum ,
51or
52.Fa sysnum
53respectively.
54.Sh RETURN VALUES
55Upon successful completion, the
56.Fn proc_str2flt ,
57.Fn proc_str2sig ,
58and
59.Fn proc_str2sys
60functions return
61.Sy 0
62and update
63.Fa fltnum ,
64.Fa signum ,
65and
66.Fa sysnum
67respectively.
68Otherwise,
69.Sy -1
70is returned to indicate that a conversion could not take place.
71.Sh INTERFACE STABILITY
72.Sy Uncommitted
73.Sh MT-LEVEL
74.Sy MT-Safe
75.Sh SEE ALSO
76.Xr libproc 3LIB ,
77.Xr proc_fltname 3PROC ,
78.Xr proc_fltset2str 3PROC ,
79.Xr proc_signame 3PROC ,
80.Xr proc_sigset2str 3PROC ,
81.Xr proc_str2fltset 3PROC ,
82.Xr proc_str2sigset 3PROC ,
83.Xr proc_str2sysset 3PROC ,
84.Xr proc_sysset2str 3PROC ,
85.Xr proc 5
86