tailhook / unshare

The low-level linux containers creation library for rust
Apache License 2.0
124 stars 27 forks source link

Add missing functionality from removed api #10

Closed nivkner closed 7 years ago

nivkner commented 7 years ago

Hi @tailhook, While you did remove the implementation leak from to_clone_flags and the unsafe from_raw_fd, there wasn't anything left in unshare to allow the library's users to pass the CloneFlags to syscalls from a Namespace or create a Stdio object directly from a RawFd respectively. This PR attempts to fix that.

tailhook commented 7 years ago

Hm, yes, sorry for not giving a feedback. I've decided that to_clone_flags is easy enough to do in vagga itself, and from_raw_fd is easy to do by using File::into_raw_fd() and passing file to the unshare.

Thank for your help, anyway!