use fs;
use std::ptr;
use std::ffi::CString;
use libc::{c_int, c_char};
pub fn enter_sandbox<'a>(_: Box<Iterator<Item=&'a fs::Directory> + 'a>) -> bool {
unsafe {
let promises = CString::new("stdio proc exec error").unwrap();
pledge(promises.as_ptr(), promises.as_ptr()) == 0
}
}
#[link(name = "c")]
extern {
fn pledge(promises: *const c_char, paths: *const *const c_char) -> c_int;
}