On 12/15/23 12:28 PM, Maksym Telychko wrote:
Bash Version: 5.2 Patch Level: 21 Release Status: releaseDescription: Process does not become foreground when run from a pipe. Repeat-By: Conditions are very special, and I am not sure who in the chain is cause of bug. In short the bug in the following line, but it should executed not from a running terminal emulator: uxterm -e bash -c 'echo /etc/fstab | { FILE="$(cat)" ; sudoedit "$FILE" ; }' It line of script must be run automatically from the WM. The chain to reproduce:| sway wm | | uxterm | | bash ... sudoedit || i3 wm | --> | alacritty | -> | | | weston | | | | | swaywm config file: exec_always uxterm -e bash -c 'echo /etc/fstab | { FILE="$(cat)" ; sudoedit "$FILE" ; }' If sudoedit running not from a pipe, it works good. Some of terminal emulators do not reproduces the problem, such as `foot` or `xfce4-terminal`. The result of the chain is an editor isn't gain a focus and I cant type anything. Again, I'm not sure that is definetely bash, but could you please check that. Thank you.
You might start by running a system call tracer like strace against the sudoedit process or the bash process that's calling it and seeing what they're doing. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature