endless loop when command completion after ./vi kicks in
Thank you for the bug report.
The completion script for vi executes vi --version to see if it is Vim or not, but this may have undesired effect if the command does not exit cleanly (especially if the command does not recognize the version option). I'll consider updating the script so that it checks the version in a more safe way.
thanks for your reply.
The completion script for vi executes vi --version
hmm, i suspected that would happen (after reading the completion script), therefore i checked strace log but didn't see any execve, strange... hmm maybe i should've used strace -f ?
I hope the issue is mitigated by r4163 but I'm still not sure if it works in all environments.
no, unfortunately the issue persists in 2.51.
r4163 is not included in 2.51. Could you try the latest commit from the repository?
oh oops. i applied https://github.com/magicant/yash/commit/988d0831968e32834e8aa79e7a5fdb7341cdb943.patch to yash 2.51 release tarball and it does indeed fix the issue. great job.
would you mind commenting on the SIGHUP issue i mentioned in #40964 ? thanks
after compiling https://github.com/aligrudi/neatvi, when i cd into the dir and type ./vi viTAB in the yash shell, yash goes into an endless loop. it seems to try to read input from fd3, and whenever i type something it reads that character and waits for the next, but never outputs anything. i straced it and figured it's trying to execute completion/vi followed by completion/ex. note that this happens on sabotage linux, where musl libc 1.1.24 is the main libc.
here's the last couple lines from strace output:
btw, congrats, thanks to yash this bug was found in musl libc: https://www.openwall.com/lists/musl/2020/11/19/1 (i actually found it when trying to rm file_with_utf_chars_in_ittab).
so i'm not sure whether this is a bug in yash 2.50 or musl libc, but this is beyond my expertise to debug it, as it involves arcane knowledge about yash internals to debug it.