(type egg)
(signature "pledge egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/pledge" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "pledge" (toc)) (section 2 "Description" (p "This extension provides bindings to OpenBSD's " (link "https://man.openbsd.org/OpenBSD-current/man2/pledge.2" ((tt "pledge(2)"))) " system call.") (p "The source for this egg is available " (link "https://git.foldling.org/chicken-pledge.git" "here") ".")) (section 2 "Usage" (p "A single procedure is provided, which has the same interface as the system call.") (highlight scheme "(use pledge)\n(pledge \"rpath\")") (section 3 "API" (def (sig (procedure "(pledge promises) => fixnum" (id pledge))) (p "Restricts the current process to the capabilities specified by " (tt "promises") ", which should be a string.") (p "On success, " (tt "0") " is returned. On error, " (tt "-1") " is returned and " (tt "errno") " should be consulted.") (p "Refer to " (tt "pledge(2)") " for more information.")))) (section 2 "Limitations" (p "Path whitelisting is not available (since, at the time of writing, " (tt "pledge(2)") "'s whitelisting feature is itself unavailable).")) (section 2 "Author" (p (int-link "/users/evan-hanson" "Evan Hanson"))) (section 2 "License" (p "3-Clause BSD"))))
