bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] coprocess pseudo-tty bug


From: arnold
Subject: Re: [bug-gawk] coprocess pseudo-tty bug
Date: Wed, 03 Jan 2018 09:33:54 -0700
User-agent: Heirloom mailx 12.4 7/29/08

address@hidden wrote:

> Yep, I'll look into it.  Really annoying.

Fix is below. I'll get it into git.

Arnold
-----------------------------------------
diff --git a/io.c b/io.c
index 7314d8e..ed651fd 100644
--- a/io.c
+++ b/io.c
@@ -2145,6 +2145,14 @@ two_way_open(const char *str, struct redirect *rp, int 
extfd)
 
                }
 
+               // Modern Linux requires this in the master,
+               // doesn't affect our "limited" system.
+               // This disallws CR in the output.
+               tcgetattr(master, & st);
+               st.c_oflag &= ~(OPOST|ONLCR);
+               st.c_oflag |= ONLRET;
+               tcsetattr(master, TCSANOW, & st);
+
                rp->pid = pid;
                rp->iop = iop_alloc(master, str, 0);
                find_input_parser(rp->iop);



reply via email to

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