]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: console: Align the behaviour against signal with pty.
authorTakashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>
Fri, 29 Jan 2021 03:45:44 +0000 (12:45 +0900)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 1 Feb 2021 09:54:04 +0000 (10:54 +0100)
- Currently, read() returns -1 with EINTR if the process is suspended
  by Ctrl-Z and resumed by fg command, while pty continues to read.
  For example, xxd command stops with error "Interrupted system call"
  after Ctrl-Z and fg. This patch aligns the behaviour with pty (and
  Linux).

winsup/cygwin/fhandler_console.cc

index 0b404411e13a41ec525dff1b577dbb6df931044c..3c07835755ef7b971a947db8d1c3a1b67fa1024c 100644 (file)
@@ -587,7 +587,8 @@ wait_retry:
          break;
        case input_signalled: /* signalled */
          release_input_mutex ();
-         goto sig_exit;
+         /* The signal will be handled by cygwait() above. */
+         continue;
        case input_winch:
          release_input_mutex ();
          continue;
This page took 0.032031 seconds and 5 git commands to generate.