Commit Graph

3 Commits

Author SHA1 Message Date
Josh Rickmar 2eea26bdea Perform ioctl system calls through x/sys/unix
OpenBSD is removing the syscall(2) interface soon and ioctl operations using
syscall.Syscall6 will fail to link at runtime:

$ go test
tmpdir: /tmp
readline.test:/tmp/go-build2875288623/b001/readline.test: undefined symbol 'syscall'
ld.so: readline.test: lazy binding failed!
signal: killed
FAIL	github.com/chzyer/readline	0.008s

These calls must instead be performed using the golang.org/x/sys/unix package,
which links to the ioctl(2) libc stub instead of the generic syscall(2)
interface.
2023-10-24 20:00:38 +00:00
ChenYe 80e2d1961b
restore term when receive signal (#200)
* restore term when receive signal

add `CaptureExitSignal` to capture exit signals and exit gracefull(disabled by default)

* update deps
2022-04-24 21:25:55 +08:00
ChenYe a11d8f26cf add go.mod and remove unnecessary dep 2022-04-13 22:35:28 +08:00