Commit Graph

5 Commits

Author SHA1 Message Date
Yuki Okushi 3fae7e9ce7 Fix style 2021-04-06 10:10:29 +09:00
Joshua M. Clulow 1f0ea0da73 add openpty and forkpty implementation for illumos systems
At time of writing, illumos systems do not provide an implementation of
the openpty() and forkpty() wrappers provided on some other UNIX
systems.  While we expect to grow an implementation, it seems prudent to
provide a compatibility routine here first to unblock illumos support in
the popular nix crate.
2020-08-05 20:39:45 -07:00
Joshua M. Clulow 5b6a3335ca fix cfmakeraw() for illumos and Solaris
This change fixes two issues.  First, the current cfmakeraw()
implementation in this crate appears to be making a stack copy of the
input "struct termios" before modifying it, rather than correctly
modifying the original through the pointer.  Before this modification
the routine did not, thus, set the flags for raw mode.

Second, we address the default settings of the MIN and TIME terminal
options.  On at least FreeBSD and Linux systems, the modern default
value for MIN appears to be 1; i.e., block and wait for at least one
input byte.  On most Solaris and illumos systems, the MIN control
character slot overlaps with EOF, and thus has a default value of 4.
This breaks at least the examples in the "termion" crate, and probably
quite a lot of other software written first and foremost for Linux
systems.  We need to force the MIN value to 1 while switching to raw
mode.
2020-04-04 16:53:26 +00:00
gnzlbg 939a2e5a3a Formatting 2019-09-12 15:12:33 +02:00
Jason King 9638d0dee0 Rename solaris dir to solarish to indicate it's including both Solaris
and Solaris-derived distributions (i.e. illumos).  In addition, a number
of missing definitions (and compatability functions) that have been
found necessary to run a number of rust binaries on illumos have been
added.

Portions were contributed by Mike Zeller <mike@mikezeller.net>
2019-02-11 21:38:30 +00:00