File: cap.mli

package info (click to toggle)
ocaml-eio 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,548 kB
  • sloc: ml: 14,608; ansic: 1,237; makefile: 25
file content (11 lines) | stat: -rw-r--r-- 639 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
val enter : unit -> (unit, [`Not_supported]) result
(** Call {{:https://man.freebsd.org/cgi/man.cgi?query=cap_enter}cap_enter}.

    Once in capability mode, access to global name spaces, such as file system
    or IPC name spaces, is prevented by the operating system. A program can call
    this after opening any directories, files or network sockets that it will need,
    to prevent accidental access to other resources.

    The standard environment directories {!Eio.Stdenv.fs} and {!Eio.Stdenv.cwd} cannot
    be used after calling this, but directories opened from them via {!Eio.Path.with_open_dir}
    will continue to work. *)