Patch 8.2.1833
Problem: When reading from stdin dup() is called twice.
Solution: Remove the dup() in main.c. (Ken Takata, closes #7110)
Files: src/main.c
*** ../vim-8.2.1832/src/main.c 2020-08-11 21:58:12.581968226 +0200
--- src/main.c 2020-10-11 14:55:49.997357909 +0200
***************
*** 2704,2724 ****
no_wait_return = TRUE;
i = msg_didany;
set_buflisted(TRUE);
! (void)open_buffer(TRUE, NULL, 0); // create memfile and read file
no_wait_return = FALSE;
msg_didany = i;
TIME_MSG("reading stdin");
check_swap_exists_action();
- #if !(defined(AMIGA) || defined(MACOS_X))
- /*
- * Close stdin and dup it from stderr. Required for GPM to work
- * properly, and for running external commands.
- * Is there any other system that cannot do this?
- */
- close(0);
- vim_ignored = dup(2);
- #endif
}
/*
--- 2704,2719 ----
no_wait_return = TRUE;
i = msg_didany;
set_buflisted(TRUE);
!
! // Create memfile and read from stdin.
! // This will also dup stdin from stderr to read commands from.
! (void)open_buffer(TRUE, NULL, 0);
!
no_wait_return = FALSE;
msg_didany = i;
TIME_MSG("reading stdin");
check_swap_exists_action();
}
/*
*** ../vim-8.2.1832/src/version.c 2020-10-11 14:28:07.074402602 +0200
--- src/version.c 2020-10-11 14:56:49.141179740 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1833,
/**/
--
hundred-and-one symptoms of being an internet addict:
62. If your doorbell rings, you think that new mail has arrived. And then
you're disappointed that it's only someone at the door.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///