gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. cfba2eb6f221d0


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.0-stable, updated. cfba2eb6f221d0f94643a57c135c62f5bc66ee10
Date: Wed, 24 Aug 2011 19:39:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-4.0-stable has been updated
       via  cfba2eb6f221d0f94643a57c135c62f5bc66ee10 (commit)
      from  337577552dfabe64647be9415a41fd13f96bf0cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=cfba2eb6f221d0f94643a57c135c62f5bc66ee10

commit cfba2eb6f221d0f94643a57c135c62f5bc66ee10
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Aug 24 22:38:39 2011 +0300

    Fix pty coprocess on Ubuntu.

diff --git a/ChangeLog b/ChangeLog
index e047cc3..c0311bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-24         Arnold D. Robbins     <address@hidden>
+
+       Fix pty co-process communication on Ubuntu GNU/Linux.
+
+       * io.c: Add include of <sys/ioctl.h> to get definition of TIOCSCTTY.
+       (two_way_open): Move call for this ioctl to after setsid() call.
+
 2011-08-23         Arnold D. Robbins     <address@hidden>
 
        * regex_internal.c (re_string_fetch_byte_case ): Remove
diff --git a/configh.in b/configh.in
index 8b40730..05fd4d2 100644
--- a/configh.in
+++ b/configh.in
@@ -243,6 +243,9 @@
 /* Define to 1 if you have the `system' function. */
 #undef HAVE_SYSTEM
 
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
diff --git a/configure b/configure
index 3760d8c..7436b5e 100755
--- a/configure
+++ b/configure
@@ -8219,7 +8219,7 @@ fi
 
 for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
        netdb.h netinet/in.h stdarg.h stddef.h string.h \
-       sys/param.h sys/socket.h sys/time.h unistd.h \
+       sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
        termios.h stropts.h wchar.h wctype.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
diff --git a/configure.ac b/configure.ac
index 28c286f..ed72522 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,7 +142,7 @@ AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
 AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \
        netdb.h netinet/in.h stdarg.h stddef.h string.h \
-       sys/param.h sys/socket.h sys/time.h unistd.h \
+       sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \
        termios.h stropts.h wchar.h wctype.h)
 
 if test "$ac_cv_header_string_h" = yes
diff --git a/io.c b/io.c
index 1dcf217..6e1d06a 100644
--- a/io.c
+++ b/io.c
@@ -34,6 +34,9 @@
 #undef RE_DUP_MAX      /* avoid spurious conflict w/regex.h */
 #include <sys/param.h>
 #endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
 
 #ifndef O_ACCMODE
 #define O_ACCMODE      (O_RDONLY|O_WRONLY|O_RDWR)
@@ -1696,9 +1699,6 @@ two_way_open(const char *str, struct redirect *rp)
                ioctl(slave, I_PUSH, "ldterm");
 #endif
 
-#ifdef TIOCSCTTY
-               ioctl(slave, TIOCSCTTY, 0);
-#endif
                tcgetattr(slave, &st);
                st.c_iflag &= ~(ISTRIP | IGNCR | INLCR | IXOFF);
                st.c_iflag |= (ICRNL | IGNPAR | BRKINT | IXON);
@@ -1735,6 +1735,10 @@ two_way_open(const char *str, struct redirect *rp)
                        /* Child process */
                        setsid();
 
+#ifdef TIOCSCTTY
+                       ioctl(slave, TIOCSCTTY, 0);
+#endif
+
                        if (close(master) == -1)
                                fatal(_("close of master pty failed (%s)"), 
strerror(errno));
                        if (close(1) == -1)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    7 +++++++
 configh.in   |    3 +++
 configure    |    2 +-
 configure.ac |    2 +-
 io.c         |   10 +++++++---
 5 files changed, 19 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]