diff --git a/src/sys/pipe.rs b/src/sys/pipe.rs index f528358..5ed27f6 100644 --- a/src/sys/pipe.rs +++ b/src/sys/pipe.rs @@ -19,6 +19,7 @@ pub enum ErrorKind } /// A raw unix pipe +// TODO: Change uses of `i32` for socket fds. Or change this to a struct (see below.) pub type RawPipe = i32; /// Create a raw pipe pair. @@ -33,6 +34,9 @@ pub(crate) fn unix_pipe() -> Result<(i32, i32), Error> } } +//TODO: Factor out the `i32` raw sockets in these types below into a seperate `RawPipe` struct, which has the Drop impl and has functions for transfering ownership of the raw socket (it should hide the raw fd when not explicitly needed ideally.) +// This will prevent us from having to ensure we `forget()` the outer type each time we want to move the inner one around without closing it. + /// A writer for a bi-directinoal unix pipe /// /// Created by splitting `Pipe`, data written to this is available to be read from its `ReadHalf` counterpart.