Current section

Files

Jump to
alcove edoc pledge-4.edoc
Raw

edoc/pledge-4.edoc

@doc pledge(2): restrict system operations
An empty list ([]) specifies promises should not be changed. Warning:
an empty string ("") is equivalent to an empty list.
To specify no capabilities, use an empty binary: `<<>>>' or `<<"">>'
== Support ==
• OpenBSD
== Examples ==
Fork a control process:
• restricted to stdio, proc and exec capabilities
• unrestricted after calling exec
```
1> {ok, Drv} = alcove_drv:start().
{ok,<0.177.0>}
2> {ok, Pid} = alcove:fork(Drv, []).
{ok,10059}
3> alcove:pledge(Drv, [Pid], <<"stdio proc exec">>, []).
ok
'''