source: project/wiki/eggref/5/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: 826 bytes
Line 
1[[tags: egg]]
2
3== pledge
4
5[[toc:]]
6
7== Description
8
9This extension provides bindings to OpenBSD's [[https://man.openbsd.org/pledge|{{pledge(2)}}]] system call.
10
11The source for this egg is available [[https://git.foldling.org/chicken-pledge.git|here]].
12
13== Usage
14
15A single procedure is provided, which has the same interface as the system call.
16
17<enscript highlight="scheme">
18(import (pledge))
19(pledge "rpath")
20</enscript>
21
22=== API
23
24<procedure>(pledge promises #!optional execpromises) => fixnum</procedure>
25
26Restricts the current process to the capabilities specified by {{promises}}, which should be a string.
27
28On success, {{0}} is returned. On error, {{-1}} is returned and {{errno}} should be consulted.
29
30Refer to {{pledge(2)}} for more information.
31
32== Author
33
34[[/users/evan-hanson|Evan Hanson]]
35
36== License
37
383-Clause BSD
Note: See TracBrowser for help on using the repository browser.