On Wed, Oct 13, 2021 at 08:57:13AM +0200, Christian Brabandt <[email protected]> wrote:
> > On Mi, 13 Okt 2021, raf wrote: > > > Hi, > > > > macos-10.14.6 > > ./configure --disable-darwin --with-x --enable-gui=athena > > --with-features=huge > > > > I just upgraded vim from approximately 8.2.2550 to 8.2.3501 > > and something important has stopped working (from gvim). > > > > I have an autocommand group for editing gpg1-encrypted files. > > It executes gpg1 via a shell and that requires access to /dev/tty. > > > > Before the upgrade, it worked in vim and (athena) gvim (i.e. > > it would ask me for the passphrase). After the upgrade, it no > > longer works in athena gvim. gpg reports: > > > > gpg: cannot open tty `/dev/tty': Device not configured > > > > The last version where this works is 8.2.2918. > > The first version that doesn't work is: > > > > 8.2.2919: using ":!command" does not work if it uses posix_spawn() > > > > That patch removed this: > > > > diff --git a/src/os_unix.c b/src/os_unix.c > > index 20c61106f..0a4f0e698 100644 > > --- a/src/os_unix.c > > +++ b/src/os_unix.c > > @@ -4775,11 +4775,6 @@ mch_call_shell_fork( > > // push stream discipline modules > > if (options & SHELL_COOKED) > > setup_slavepty(pty_slave_fd); > > -# ifdef TIOCSCTTY > > - // Try to become controlling tty (probably doesn't work, > > - // unless run by root) > > - ioctl(pty_slave_fd, TIOCSCTTY, (char *)NULL); > > -# endif > > } > > # endif > > set_default_child_environment(FALSE); > > > > If I run :!tty, it outputs /dev/ttys007, so I tried > > replacing "!gpg1" in the commands with "!GPG_TTY=`tty` gpg1" > > in the latest version, but that didn't work. > > > > Any idea what I need to do to restore access to /dev/tty > > from the athena gui? Or do I have to downgrade to 8.2.2918 > > and stay there? > > This may depend on the shell you use. So what shell are you using? See > also https://github.com/vim/vim/issues/8951 > > Best, > Christian Thanks. Yes, I'm using zsh as well. If I prefix the vim command with "SHELL=/bin/sh", the latest version works. cheers, raf -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/YWegvXle7CVF42qy%40raf.org.
