Skip to content

Pull in fix for pasting more than 1024 characters #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dscho
Copy link
Member

@dscho dscho commented Jul 7, 2022

tyan0 and others added 16 commits May 15, 2022 06:37
- Previously, the command "cmd /c script -c cmd" in console of Win7
  crashes. This seems to be due to a bug (?) of AttachConsole().
  This patch adds workaround for this issue.

  Currently, pty reattaches to the console of the process which is
  predetermined by ConsoleProcessList() after temporarily attaching
  to another console. After that, the console output handle opened
  with the name "CONOUT$" may not be accessible in Win7 or Vista.
  This seems to happen when the attached process does not have the
  same handle even if the console attached is the same. With this
  patch, cygwin-console-helper which is started when pty master is
  opened in console, is utilized to be a target process to which
  pty reattaches if the OS is Win7 or Vista.
killpg(pgid, 0) (or kill_pgrp(pgid, si_signo=0), in signal.cc)
fails (returns -1) even when there is a process in the process
group pgid, if the process is in the middle of spawnve(), see

  https://cygwin.com/pipermail/cygwin/2022-May/251479.html

When exec'ing a process the assumption is that the exec'ed process creates its
own symlink (in pinfo::thisproc() in pinfo.cc). If the exec'ing process
calls NtClose on it's own winpid symlink, but the exec'ed process didn't
progress enough into initialization, there's a slim chance that neither
the exec'ing process, nor the exec'ed process has a winpid symlink
attached.

Always create the winpid symlink in spawn.cc, even for exec'ed Cygwin
processes.  Make sure to dup the handle into the new process, and stop
creating the winpid symlink in exec'ed processes.

Signed-off-by: Corinna Vinschen <[email protected]>
The current definition of mknod in syscalls.cc has a third argument of
type __dev16_t instead of dev_t.  Fix this on 64-bit Cygwin by making
the existing mknod 32-bit only and then exporting mknod as an alias
for mknod32.  (No fix is needed on 32-bit because mknod is redirected
to mknod32 via NEW_FUNCTIONS in Makefile.am.)

Addresses: https://cygwin.com/pipermail/cygwin-developers/2022-May/012589.html
- After the commit 6d898f4, cygwin fails to start if cygwin1.dll
  is placed in the root directory. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-May/251548.html
- Currently, ENABLE_VIRTUAL_TERMINAL_PROCESSING flag is disabled
  unconditionally when exiting from cygwin. This causes ANSI escape
  sequence disabled in Windows Terminal where it is enables by
  default. This patch retains that flag if it is originally enabled.
- Previously, the console code could not handle escape sequence
  setting window title longer than 256 byte correctly. This patch
  fixes the issue.
  Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251662.html
- poll() has a bug that it returns event which is not inquired if
  events are inquired in multiple pollfd entries on the same fd at
  the same time. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251732.html
- Currently, if the text longer than 1024 byte is pasted in console,
  some of the text is discarded. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251764.html
- The previous commit for console introduced new bugs in error
  handling in cons_master_thread(). This patch fixes that.
- The recent commit "Cygwin: console: Allow pasting very long text
  input." did not fix the issue enough. This patch adds fixes for
  that.
Let's undo this, for two reasons:

- since we rebased to v3.3.5, it was incorrect to decrement the DLL
  version, and

- we're about to pull in an intermediate change (again) which will claim
  that we're at v3.3.6, and we'll need to decrement _that_.

Signed-off-by: Johannes Schindelin <[email protected]>
To allow Git for Windows to enjoy the bug fixes e.g. for
git-for-windows/git#3936 without having to
wait for Cygwin v3.3.6, we merge the current tip of `cygwin-3_3-branch`.

Signed-off-by: Johannes Schindelin <[email protected]>
Let's decrement the DLL version again because the `cygwin-3_3-branch`
tip claims to carry version v3.3.6 in anticipation of that version, but
it is of course not that version yet.

Hopefully I won't forget to drop this patch when rebasing to v3.3.6 ;-)

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Jul 7, 2022
@dscho dscho merged commit 4ca643e into git-for-windows:main Jul 8, 2022
@dscho dscho deleted the pull-in-fix-for-pasting-more-than-1024-characters branch July 8, 2022 08:51
@dscho
Copy link
Member Author

dscho commented Jul 8, 2022

The build is running.

@dscho
Copy link
Member Author

dscho commented Jul 8, 2022

The build is running.

And it succeeded, so I kicked off the 32-bit and the 64-bit sync workflow, which both succeeded in integrating the new msys2-runtime package version into git-sdk-32 and git-sdk-64, respectively.

Now I will merge git-for-windows/git#2068 as an "excuse" to build a new snapshot, as soon as that PR's CI/PR run passes.

@dscho
Copy link
Member Author

dscho commented Jul 8, 2022

There's now a new snapshot ready for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data loss when pasting
4 participants