source: project/wiki/eggref/4/pledge @ 36801

Last change on this file since 36801 was 36801, checked in by evhan, 11 months ago

wiki/eggref: update docs/formatting/urls and eggref/5/{r7rs,fancypants,chicken-belt}

File size: 965 bytes
Line 
1[[tags: egg]]
2
3== pledge
4
5[[toc:]]
6
7== Description
8
9This extension provides bindings to OpenBSD's
10[[https://man.openbsd.org/OpenBSD-current/man2/pledge.2|{{pledge(2)}}]]
11system call.
12
13The source for this egg is available
14[[https://git.foldling.org/chicken-pledge.git|here]].
15
16== Usage
17
18A single procedure is provided, which has the same interface as the
19system call.
20
21<enscript highlight="scheme">
22(use pledge)
23(pledge "rpath")
24</enscript>
25
26=== API
27
28<procedure>(pledge promises) => fixnum</procedure>
29
30Restricts the current process to the capabilities specified by
31{{promises}}, which should be a string.
32
33On success, {{0}} is returned. On error, {{-1}} is returned and
34{{errno}} should be consulted.
35
36Refer to {{pledge(2)}} for more information.
37
38== Limitations
39
40Path whitelisting is not available (since, at the time of writing,
41{{pledge(2)}}'s whitelisting feature is itself unavailable).
42
43== Author
44
45[[/users/evan-hanson|Evan Hanson]]
46
47== License
48
493-Clause BSD
Note: See TracBrowser for help on using the repository browser.