Hacker News new | ask | show | jobs
by h4x0rr 899 days ago
It's hard to do by accident and is pretty unix specific. Also, what if you really want do access this and it panics?
1 comments

> Also, what if you really want do access this and it panics?

That's the easy part, you'd provide some OS-specific API for getting this file handle, call it `std::os::fs::proc()` or thereabouts, and make it an `unsafe` function. The "hard to do" is the bigger problem, because if you're providing an unsafe alternative then you'd like to plug all the holes in the safe interface, which AFAIK is non-trivial.