diff --git a/pty_linux.go b/pty_linux.go index 296dd21..4a833de 100644 --- a/pty_linux.go +++ b/pty_linux.go @@ -46,6 +46,6 @@ func ptsname(f *os.File) (string, error) { func unlockpt(f *os.File) error { var u _C_int - // use TIOCSPTLCK with a zero valued arg to clear the slave pty lock + // use TIOCSPTLCK with a pointer to zero to clear the lock return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u))) } diff --git a/pty_openbsd.go b/pty_openbsd.go index 6e7aeae..a6a35d1 100644 --- a/pty_openbsd.go +++ b/pty_openbsd.go @@ -11,7 +11,7 @@ func open() (pty, tty *os.File, err error) { * from ptm(4): * The PTMGET command allocates a free pseudo terminal, changes its * ownership to the caller, revokes the access privileges for all previous - * users, opens the file descriptors for the master and slave devices and + * users, opens the file descriptors for the pty and tty devices and * returns them to the caller in struct ptmget. */ diff --git a/util.go b/util.go index 68a8584..2fa741c 100644 --- a/util.go +++ b/util.go @@ -8,15 +8,15 @@ import ( "unsafe" ) -// InheritSize applies the terminal size of master to slave. This should be run -// in a signal handler for syscall.SIGWINCH to automatically resize the slave when -// the master receives a window size change notification. -func InheritSize(master, slave *os.File) error { - size, err := GetsizeFull(master) +// InheritSize applies the terminal size of pty to tty. This should be run +// in a signal handler for syscall.SIGWINCH to automatically resize the tty when +// the pty receives a window size change notification. +func InheritSize(pty, tty *os.File) error { + size, err := GetsizeFull(pty) if err != nil { return err } - err = Setsize(slave, size) + err = Setsize(tty, size) if err != nil { return err }