Commit Graph

110 Commits

Author SHA1 Message Date
Guillaume J. Charmes
4f76b68d8a Add tests to make sure ptys are individually addressalbe. Enable windows in GHA tests. 2023-10-31 18:45:05 -04:00
Guillaume J. Charmes
2dfd24de61 Merge pull request #173 from creack/tests-cleanup
Tests cleanup
2023-10-31 14:32:43 -04:00
Guillaume J. Charmes
cafb3b47d0 Fix typo. 2023-10-31 14:32:20 -04:00
Guillaume J. Charmes
0a15590bf0 Skip tests for go1.6. 2023-10-31 10:55:31 -04:00
Guillaume J. Charmes
219f7e0db9 Add more test helpers, cleanup existing tests. Add editorconfig and golangci config, comply with golangci rules. 2023-10-31 10:52:38 -04:00
Guillaume J. Charmes
ccf8e7e6b6 Add openClose helper in tests to remove duplication. 2023-10-31 09:20:53 -04:00
Guillaume J. Charmes
bc68e99fbc Minor cosmetic cleanups in the tests. Add missing error checks. Use Fatal instead of Error to avoid panics upon failure. 2023-10-31 09:11:12 -04:00
Guillaume J. Charmes
a425b37197 Bump major version to v2. Drop support for the old riscv in favor of the official riscv64 (see #168). 2023-10-28 10:50:27 -04:00
Guillaume J. Charmes
9e7704ebe7 Merge pull request #154 from calculi-corp/master
Upgrade to go version 1.18.2 to fix multiple CVEs
2023-10-28 07:39:06 -07:00
Guillaume J. Charmes
7aeba9291c Update github actions. 2023-10-28 10:36:44 -04:00
Guillaume J. Charmes
1985fd408d Merge pull request #167 from sio/ioctl
Avoid calls to (*os.File).Fd() and operations on raw file descriptor ints
v1.1.20
2023-10-28 07:19:50 -07:00
Guillaume J. Charmes
8042b227ec Revert riscv removal. v1.1.19 2023-10-26 11:23:10 -04:00
Guillaume J. Charmes
5c92749733 Merge pull request #168 from sio/riscv
Use upstream compiler for linux/riscv64 and freebsd/riscv64
2023-10-26 08:19:57 -07:00
Guillaume J. Charmes
04081dc6b3 Merge pull request #30 from samm-git/master
Add support for the 32-bit PPC Linux platform
2023-10-26 08:10:52 -07:00
Guillaume J. Charmes
24db57f63d Merge pull request #157 from matoro/master
Add sparc support
2023-10-26 07:42:32 -07:00
Vitaly Potyarkin
7f1364099e Use upstream compiler for linux/riscv64 and freebsd/riscv64
Close #149
2023-04-28 17:52:33 +03:00
Vitaly Potyarkin
3abf458f02 Notify about intentionally using blocking io on Darwin 2023-04-28 11:26:34 +00:00
Vitaly Potyarkin
75e52f1103 Do not fail if SetDeadline is not supported by OS 2023-04-28 10:32:36 +00:00
Vitaly Potyarkin
418593def3 Restore support for older Go versions
When compiled with go older than 1.12 creack/pty will not include a fix
for blocking Read() and will be prone to data races - but at least it will work

For more information see issues: #88 #114 #156 #162
2023-04-28 10:16:36 +00:00
Vitaly Potyarkin
87d82d3af0 Rename ioctl.go back
This filename trick forces git to render previous commit diff
in a more comprehensible form
2023-04-28 09:34:49 +00:00
Vitaly Potyarkin
291695431f Do not set file descriptor into blocking mode
(*os.File).Fd() implicitly sets file descriptor into blocking mode [1], [2]
We avoid that by calling (*os.File).SyscallConn instead.
This method was added in go1.12 (released on 2019-02-25)

[1]: https://pkg.go.dev/os#File.Fd
[2]: https://cs.opensource.google/go/go/+/refs/tags/go1.20.3:src/os/file_unix.go;l=80-87
2023-04-28 09:24:09 +00:00
Vitaly Potyarkin
5c3f42aa4e Add tests to detect forever hanging Read() 2023-04-28 09:23:20 +00:00
matoro
3a069a34a2 Add sparc support 2022-09-01 14:29:51 -04:00
Pinaki Sarkar
7e0c64ddab Upgrade to go version 1.18.2 to fix multiple CVEs 2022-07-01 16:16:46 -07:00
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