Commit Graph

85 Commits

Author SHA1 Message Date
Joel Sing
0d412c9fbe Provide correct pty/tty file paths on OpenBSD (#148)
While here, add test coverage for opening the TTY from the given filename.
2022-04-21 17:18:55 -04:00
Fraser Waters
2e47437b1f Add some basic tests (#145) 2022-03-29 04:18:40 -07:00
Guillaume J. Charmes
d301b27172 fix aix compile error (#144)
* Fix windows compilation

* Fix compilation for AIX. Relates to #139

* Remove unused import for windows
v1.1.18
2022-03-27 10:49:54 -07:00
Fraser Waters
6eb8749846 Remove go 1.6 on macos test run (#143) 2022-03-27 10:44:08 -07:00
Guillaume J. Charmes
a24f8808b5 Fix windows compilation (#142) 2022-03-27 10:36:46 -07:00
Fraser Waters
7de28cee0d Add GHA workflow to run test_crosscompile and go test (#141)
* Add GHA workflow to run test_crosscompile and go test
* crosscompile job doesn't need setup-go
* Test more go versions
* Test 1.6
* Remove 1.13 and add comment of testing strategy
2022-03-27 08:14:20 -04:00
Guillaume J. Charmes
edfd13da2a Remove ppc from freebsd as it is not available in go1.18beta1. Check error in Getsize(). (#137) 2022-01-31 08:33:52 -05:00
Ryo Ota
7b57fd2675 Use uint16 in winsize_unsupported.go (#136) 2022-01-31 08:29:29 -05:00
abner.chen
b135084511 Rename loongarchx to loong64. (#130)
loong64 GOARCH value reserved for LoongArch architecture:
	https://golang.org/doc/go1.17.

github issues:
	https://github.com/golang/go/issues/46229

LoongArch documents:
	https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html

Signed-off-by: guoqi.chen <chenguoqi@loongson.cn>
v1.1.17
2021-10-16 13:41:19 -04:00
lenoil98
ac2ba380e8 Add freebsd/ppc64 support in test_crosscompile.sh (#128) v1.1.16 2021-09-27 12:21:23 -04:00
lenoil98
819195d464 Add support for freebsd/ppc64 (#126) 2021-09-27 12:20:55 -04:00
Graham Clark
8ac0cc1360 Fix typo in openbsd build constraint (#125)
I noticed this when building termshark with Go 1.17.
v1.1.15
2021-08-21 18:08:37 -04:00
Aaron Bieber
c1836eafaf Add support for OpenBSD mips64 (#123) v1.1.14 2021-07-26 21:35:49 -04:00
Guillaume J. Charmes
f73a158a9a Simplify solaris implementation. (#120)
Remove golang.org/x/sys/unix dependency for solaris
Add new go build tag directives
v1.1.13
2021-05-29 18:39:47 -04:00
whorfin
a76ea1c682 Add pty.InheritSize for solaris support (#118) 2021-05-29 13:28:15 -04:00
Guillaume J. Charmes
4f15fbdd3a add arm64 to feebsd and nebsd in test script v1.1.12 2021-05-16 12:39:48 -04:00
Guillaume J. Charmes
5e261bd7a0 run gofmt 2021-05-16 12:32:27 -04:00
guoqi.chen
d8c5af0daf Add loongarch support (#116)
Signed-off-by: guoqi.chen <chenguoqi@loongson.cn>
2021-05-16 12:28:03 -04:00
Iain Buclaw
e9fe422625 Add support for NetBSD 386/amd64/arm (#117) 2021-05-16 12:17:26 -04:00
Guillaume J. Charmes
060a4be6ce Update cross compile test for go1.16 2021-04-05 16:01:08 -04:00
Guillaume J. Charmes
ab4a70c372 Closes #111. Close chan in README example. 2021-04-05 15:58:33 -04:00
Sebastiaan van Stijn
097644e6ac README: replace deprecated crypto/ssh/terminal (#108)
The golang.org/x/crypto/ssh/terminal package was deprecated
in favor of golang.org/x/term.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-24 09:41:28 -05:00
Isao Jonas
a6c0a376f1 Add O_NOCTTY for darwin when opening slave (#93)
Same as in #9, on darwin if there is no controlling terminal then opening a terminal will set that as the controlling terminal for the process which then causes a failure when setting it on the child.
2020-08-04 14:06:58 -04:00
Guillaume J. Charmes
2a38352e8b Add openbsd archs
Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>
v1.1.11
2020-05-19 12:21:43 -04:00
Matthew Martin
110238dc20 Unify OpenBSD ztypes; adds arm support (#98) 2020-05-19 12:20:50 -04:00
Guillaume J. Charmes
f272787f85 Add StartWithAttrs to allow bypassing setsid/setctty (#97)
Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>
v1.1.10
2020-05-07 09:35:59 -04:00
Tobias Kortkamp
8ab47f72e8 Add support for freebsd/arm64 (#87) 2019-12-09 06:58:40 -05:00
Guillaume J. Charmes
3a6a957789 Bump go 1.13
Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>
v1.1.9
2019-09-25 11:36:33 -04:00
Guillaume J. Charmes
2769f65a3a remove go.mod in go.mod
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
v1.1.7
2019-06-29 11:33:18 -04:00
Guillaume J. Charmes
bbd30d0db8 Add riscv
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
v1.1.6
2019-06-29 11:10:31 -04:00
Carlos Eduardo
efa78fa813 Add riscv64 support (#81) 2019-06-29 11:04:48 -04:00
Guillaume J. Charmes
bdde493334 Enable solirs in cross compile test.
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
2019-06-29 11:03:36 -04:00
Fazal Majid
d584804c77 support for Solaris (#64)
* first draft of Solaris support

* implemented new APIs for Solaris

* fixes for Solaris ioctls, tested using github.com/yudai/gotty as a test bed
2019-06-29 11:02:41 -04:00
Guillaume J. Charmes
8a22c94093 s/kr/creack/ in README
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
2019-06-29 10:59:02 -04:00
Guillaume J. Charmes
09f9379b91 Add crosscopile test script.
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
2019-06-29 10:56:49 -04:00
Drew DeVault
b6e1bdd4a4 Set Ctty in SysProcAttr (#75) v1.1.5 2019-03-31 20:15:51 -07:00
Okunev Yu Dmitry
521317be5e Don't set Stdin/Stdout/Stderr if already set (#71)
* only set stdout and stderr if not already set

* Don't set cmd.Stdin if it's already set

Considered @craek's codereview
v1.1.4
2019-03-18 08:38:44 -04:00
Keith Rarick
7dc38fb350 remove deprecated nomenclature
The words "master" and "slave" in this context are both
harmful and, as a technical matter, confusing and
misleading. It was never my intention to use those terms
in this library, but they snuck in while I wasn't paying
attention.

This change replaces them with "pty" and "tty",
respectively, to be consistent with the other files in
this package and with the device names on BSD platforms.
These terms are not harmful (to the best of my
knowledge) and they're more specific.

In editing the comment in pty_linux.go, this patch also
corrects a factual error. The ioctl argument is not
"zero valued", it is a nonzero pointer to the number 0.
2019-01-30 17:10:33 -08:00
Keith Rarick
38258927ff go mod init 2019-01-30 16:59:02 -08:00
Dustin Spicuzza
db8e3cd836 Add StartWithSize to allow resizing pty before starting a command to avoid races (#62) v1.1.3 2018-09-15 11:00:18 -04:00
Derek Marcotte
fa756f09ee Add support for OpenBSD 386. Prevents compile errors. (#60)
Created file from a OpenBSD 386 installation and:

go tool cgo -godefs types_openbsd.go > ztypes_openbsd_386.go
v1.1.2
2018-06-20 11:12:22 -04:00
Guillaume J. Charmes
282ce0e532 Improve error management for openpty (#57)
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
v1.1.1
2018-01-13 13:08:13 -05:00
Guillaume J. Charmes
f8811ff0e5 add openbsd/amd64 support (#58)
* add openbsd/amd64 support

* Remove extra C dependency and add time include

Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>
2018-01-13 13:07:53 -05:00
Guillaume J. Charmes
1278f20d9c Add shell example to readme
Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>
v1.1.0
2018-01-06 14:11:30 -05:00
Jonathan Logan
f4f01f5967 Added terminal/pty resize functionality and utility function to inherit size from master's pty to slave. Changes type winsize to make it accessible from outside the package. (#39) 2018-01-06 12:34:20 -05:00
Guillaume J. Charmes
95d05c1eef Prevent golang to set the non-block flag on ptmx open to avoid 100% CPU usage on reads (#53)
Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net>
v1.0.1
2017-10-06 13:48:01 -04:00
Guillaume J. Charmes
2c10821df3 Add mips64 mips64le build tags (#47)
Signed-off-by: Guillaume J. Charmes <gcharmes@leaf.ag>
v1.0.0
2017-03-07 08:53:09 -06:00
vstefanovic
54a2d19ee2 Add support for mips, mipsle (#45) 2017-03-07 08:49:17 -06:00
Guillaume J. Charmes
ce7fa45920 Merge pull request #44 from cmarcelo/pr/dragonfly-gofmt
Reformat pty_dragonfly.go file using gofmt
2016-07-16 15:46:20 -05:00
Caio Marcelo de Oliveira Filho
ed84cf86c9 Reformat pty_dragonfly.go file using gofmt 2016-07-14 10:03:11 -03:00