-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console.NewPty panics on macOS #79
Comments
And the reason for the crash is that First, it attempts to use Second, and most important, it doesn't properly use func ptsname(f *os.File) (string, error) {
n := make([]byte, 128)
if _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, f.Fd(), syscall.TIOCPTYGNAME, uintptr(unsafe.Pointer(&n[0]))); errno != 0 {
return "", errno
}
end := bytes.IndexByte(n, 0)
if end < 0 {
return "", errors.New("TIOCPTYGNAME string not NUL-terminated")
}
return string(n[:end]), nil
} |
Merged
slonopotamus
added a commit
to slonopotamus/console
that referenced
this issue
Jul 22, 2023
slonopotamus
added a commit
to slonopotamus/console
that referenced
this issue
Jul 22, 2023
See containerd#79 Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Closed
1 task
@dmcgowan can we merge this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
macOS Ventura, M1, go 1.20.6, console 1.0.3
A trivial program
Crashes with
The text was updated successfully, but these errors were encountered: