mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f864421ead
This patch updates all dependencies to match what is used in moby/moby. Making the dependencies match what is used in that repository makes sure we test with the same version as libnetwork is later built with in moby. This also gets rid of some temporary forks that were needed during the migration of Sirupsen/logrus to sirupsen/logrus. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
29 lines
708 B
Go
29 lines
708 B
Go
package console
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
const (
|
|
cmdTcGet = unix.TIOCGETA
|
|
cmdTcSet = unix.TIOCSETA
|
|
)
|
|
|
|
// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
|
|
// unlockpt should be called before opening the slave side of a pty.
|
|
// This does not exist on FreeBSD, it does not allocate controlling terminals on open
|
|
func unlockpt(f *os.File) error {
|
|
return nil
|
|
}
|
|
|
|
// ptsname retrieves the name of the first available pts for the given master.
|
|
func ptsname(f *os.File) (string, error) {
|
|
n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCGPTN)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return fmt.Sprintf("/dev/pts/%d", n), nil
|
|
}
|