Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix heredocs crash/hangup on Solaris/illumos in interactive shells
This was first reported in att#1472. Attempting to cancel a heredoc with ^C or ^D can cause ksh to crash with a segfault, or hangup and fill /tmp with files. Copy of the reproducer: $ cat << EOS > <Press Ctrl+C or Ctrl+D> src/cmd/ksh93/sh/main.c: - Reset the lexer state in an interactive shell if here-document creation was cancelled. This patch has been adapted from Solaris: https://github.com/oracle/solaris-userland/blob/e478b48/components/ksh93/patches/400-29444429.patch Due to the nature of this bug, I've skipped adding a regression test as it risks causing pty to hang up if run against an older release of ksh93 (cf. ksh93#356).
- Loading branch information