public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pty: Fix state mismatch caused in octave gui. Date: Fri, 17 Jan 2020 09:21:00 -0000 [thread overview] Message-ID: <20200117092130.96981.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7e6c96d6e1485b52b4243d0cd9699f2063645660 commit 7e6c96d6e1485b52b4243d0cd9699f2063645660 Author: Takashi Yano <takashi.yano@nifty.ne.jp> Date: Thu Jan 16 20:04:47 2020 +0900 Cygwin: pty: Fix state mismatch caused in octave gui. - In octave gui, sometimes state mismatch between real pty state and state variable occurs. For example, this occurs when 'ls' command is executed in octave gui. This patch fixes the issue. Diff: --- winsup/cygwin/spawn.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 08d52bb..f7c6dd5 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -947,6 +947,15 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { FreeConsole (); AttachConsole (pid_restore); + cygheap_fdenum cfd (false); + int fd; + while ((fd = cfd.next ()) >= 0) + if (cfd->get_major () == DEV_PTYS_MAJOR) + { + fhandler_pty_slave *ptys = + (fhandler_pty_slave *) (fhandler_base *) cfd; + ptys->fixup_after_attach (false, fd); + } } return (int) res;
reply other threads:[~2020-01-17 9:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200117092130.96981.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).