62 Commits

Author SHA1 Message Date
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
Guillaume J. Charmes
a6bad5ee6f Merge pull request #36 from keybase/master
Don't attempt to build on windows
2016-06-24 07:19:03 -05:00
Guillaume J. Charmes
0467868096 Merge pull request #41 from mneumann/fix_dragonfly
Support DragonFly BSD
2016-05-20 10:59:22 -05:00
Michael Neumann
c0bea8ed3c Support DragonFly BSD
Tested with "go test" of github.com/creack/termios.
2016-05-20 15:25:14 +02:00
Steve Sanders
fe7bf43396 Don't attempt to build on windows 2015-11-04 12:44:15 -08:00
Jonathan Boulle
f7ee69f312 run: don't override supplied SysProcAttr
If we're passed an exec.Cmd that already has a configured SysProcAttr,
Start was obliterating it by overwriting it with a new struct in order
to set `Setctty` and `Setsid`. Instead, just adjust the parameters that
we need.
2015-10-07 16:04:24 -07:00
Guillaume J. Charmes
5cf931ef8f Prevent arm64 file to be compiled anywhere else. Fixed #32. 2015-05-11 13:47:10 -04:00
Guillaume J. Charmes
8dd5c9d727 Merge pull request #31 from hqhq/hq_add_arm64_support
Add support for ARM64
2015-05-11 13:15:35 -04:00
Qiang Huang
35af567f73 Add support for ARM64
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-11 16:26:17 +08:00
Guillaume J. Charmes
05017fcccf Merge pull request #26 from yoheiueda/use-syscall-consts
Use syscall.TIOCGPTN and syscall.TIOCSPTLCK for ioctl
2014-12-17 16:19:37 -05:00
Yohei Ueda
9cf8a72e81 Remove uintptr(...)
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-12-04 22:21:03 +09:00
Yohei Ueda
e615e17b3e Remove ioctl_* constants on Linux
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-12-03 22:25:00 +09:00
Yohei Ueda
b1c5cc8377 Use syscall.TIOCGPTN and syscall.TIOCSPTLCK for ioctl
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-25 10:32:31 +00:00
Guillaume J. Charmes
53dd597300 Merge pull request #25 from yoheiueda/add-power-systemz
Add support for Power (ppc64, ppc64le) and System z (s390x)
2014-11-21 10:43:19 -05:00
Yohei Ueda
46d423f13f Add support for Power (ppc64, ppc64le) and System z (s390x)
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-21 10:59:21 +00:00
Yuval Pavel Zholkover
67e2db24c8 add generated ztypes_arm.go and ztypes_freebsd_arm.go
Tidy unused ioctl arguments
2014-03-16 09:51:15 +02:00
Yuval Pavel Zholkover
88e4fdb5b4 Portable ioctl calls
Add _IOC macros (<sys/ioccom.h>, <asm-generic/ioctl.h>) for linux and bsd's, unify ioctl() calls.
FreeBSD: use modern pts(4) interface instead of the old pty(4) one
2014-03-14 17:28:51 +02:00
Keith Rarick
98c7b80083 define public symbols without build constraints 2014-03-04 20:22:29 -08:00
Guillaume J. Charmes
7a543c8bf6 Add pty_unsupported.go file in order to allow projects to import the package and still compile on other os/arch 2014-03-03 21:23:38 -08:00
Kim "BKC" Carlbäcker
76284c52ce Added support for FreeBSD (copy pty_linux.go) 2014-03-03 21:19:56 -08:00
Cameron Stewart
3b1f6487b7 Add no NOCTTY, required for when there is no controlling terminal 2013-09-27 01:57:47 +10:00
Keith Rarick
27435c699b factor out docs 2013-03-16 18:30:08 -07:00
Keith Rarick
87da17124b get rows and cols in a tty 2013-03-16 18:25:38 -07:00
Keith Rarick
c46bdbf4af remove obsolete caveat 2012-12-03 23:34:44 -08:00