Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Latest commit

 

History

History
16 lines (12 loc) · 374 Bytes

README.md

File metadata and controls

16 lines (12 loc) · 374 Bytes

Haskell library for OpenBSD's pledge(2)

Example Haskell program:

import System.Pledge
import System.IO

main :: IO ()
main = do
  pledge [Stdio] []
  print "Pledge works"
  withFile "/dev/urandom" ReadMode $ \f ->
    hGetContents f >>= putStr

pledge(2) kills this when withFile tries to open file.