45 Commits

Author SHA1 Message Date
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
Keith Rarick
b07888f6df fix race in sample code
Don't close the pty directly; instead send an EOT to
cause the terminal to indicate end-of-file in the
slave device. Closing the pty caused io.Copy to return
early. Fixes #7.
2012-12-03 23:17:35 -08:00
Keith Rarick
2a896e26c7 darwin support
Based on ac3ece1daa by
Burke Libbey <burke@libbey.me>.
2012-12-03 23:12:11 -08:00
Keith Rarick
02033fc6c5 remove obsolete makefile 2012-12-03 18:21:06 -08:00
Keith Rarick
1fb082f569 set controlling tty for new process; closes #8 2012-11-03 16:17:05 -07:00
Keith Rarick
59dd1489cc work with new os/exec 2012-02-01 21:46:36 -08:00
Keith Rarick
3b1c6581cb go fmt 2012-02-01 21:41:44 -08:00
Sherjil Ozair
9e03abc5be Some changes to make the code compile with GO version 1.0.1. However, there would be also be some changes in functionality. This is due to changes in the type of cmd.Stdin and cmd.Stdout, and their inability to write as well read. The example given in readme.md doesn't work. I'm figuring out a way to make changes in the example so that it works. 2012-06-13 13:29:54 +01:00
Keith Rarick
44e8fe6bc9 add MIT license; closes #2 2012-04-05 14:07:33 -07:00
Keith Rarick
411b3baef3 simply remove the broken darwin implementation 2011-08-15 14:43:39 -07:00
Keith Rarick
227762de52 gofix for release.r57.1 2011-05-24 12:08:43 -07:00
Keith Rarick
e4a07d1891 document that darwin is broken 2011-05-24 12:08:10 -07:00
Keith Rarick
12319125d6 initial 2011-05-03 14:24:49 -07:00