mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
recvtty: use ioutil.Discard
Saves us a few lines of code. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -165,15 +165,7 @@ func handleNull(path string) error {
|
||||
return
|
||||
}
|
||||
|
||||
// Just do a dumb copy to /dev/null.
|
||||
devnull, err := os.OpenFile("/dev/null", os.O_RDWR, 0)
|
||||
if err != nil {
|
||||
// TODO: Handle this nicely.
|
||||
return
|
||||
}
|
||||
|
||||
io.Copy(devnull, master)
|
||||
devnull.Close()
|
||||
io.Copy(ioutil.Discard, master)
|
||||
}(conn)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user