diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-15 20:00:53 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-15 20:00:53 +0200 |
commit | bf757c5ee278975b419c337d0ab63681d4529245 (patch) | |
tree | b62be08b4c80a0986d8ed8126f54a281b3defa92 /io.c | |
parent | 2aee8dba0e30d477ff259764b0d39eb622cd584a (diff) | |
parent | 0dc91138b713b60d763aa26eb119ca710febd348 (diff) | |
download | egawk-bf757c5ee278975b419c337d0ab63681d4529245.tar.gz egawk-bf757c5ee278975b419c337d0ab63681d4529245.tar.bz2 egawk-bf757c5ee278975b419c337d0ab63681d4529245.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -1892,6 +1892,7 @@ strictopen: return openfd; } +#if defined(HAVE_TERMIOS_H) /* push_pty_line_disciplines --- push line disciplines if we work that way */ // Factors out common code for the two versions of fork_and_open_slave_pty(). @@ -1923,7 +1924,6 @@ push_pty_line_disciplines(int slave) static void set_slave_pty_attributes(int slave) { -#ifdef HAVE_TERMIOS_H struct termios st; tcgetattr(slave, & st); @@ -1952,7 +1952,6 @@ set_slave_pty_attributes(int slave) st.c_cc[VEOF] = '\004'; /* ^d */ #endif tcsetattr(slave, TCSANOW, & st); -#endif /* HAVE_TERMIOS_H */ } @@ -1967,18 +1966,17 @@ set_slave_pty_attributes(int slave) * seems to be the simplest thing to do. */ -#if defined _AIX || defined __hpux static bool fork_and_open_slave_pty(const char *slavenam, int master, const char *command, pid_t *pid) { int slave; int save_errno; +#if defined _AIX || defined __hpux /* * We specifically open the slave only in the child. This allows - * certain, er, "limited" systems to work. The open is specifically - * without O_NOCTTY in order to make the slave become the controlling - * terminal. + * AIX and HP0UX to work. The open is specifically without O_NOCTTY + * in order to make the slave become the controlling terminal. */ switch (*pid = fork()) { @@ -2026,14 +2024,8 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p default: return true; } -} + #else -#ifndef VMS -static bool -fork_and_open_slave_pty(const char *slavenam, int master, const char *command, pid_t *pid) -{ - int slave; - int save_errno; if ((slave = open(slavenam, O_RDWR)) < 0) { close(master); @@ -2094,7 +2086,8 @@ fork_and_open_slave_pty(const char *slavenam, int master, const char *command, p return true; } #endif -#endif + +#endif /* defined(HAVE_TERMIOS_H) */ /* two_way_open --- open a two way communications channel */ |