Repository navigation
Terminal process group handling and "\e" #602
slackwhere
started this conversation in
General
Replies: 3 comments 1 reply
|
@slackwhere try the |
1 reply
|
@slackwhere You need latest Go 1.27 to build |
0 replies
|
Apologies, I had 2 versions of go installed on my system and the older one was getting called unexpectedly. The issue is resolved when compiling the main branch with go1.27.3. 👍 Thank you for your help. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I use vile as my editor when running usql. Vile's default key bindings use the control-c command to set the search pattern for the word under the cursor. It seems that usql is hanging onto the foreground process group when running child processes via the "\e" command. This means that usql is receiving keystrokes, or signals in this case, that are meant for the child process that it has spawned.
When spawning a child process, usql should create a new process group and then set that process group as the terminal foreground group tcsetpgrp so that signals generated terminal by keystrokes are directed at the child process. When the child process exits, usql should call tcsetpgrp again with it's own progress group ID.
I verified this solution will work using a small C wrapper and setting that to the value of $EDITOR before invoking usql.
Regards,
Wayne
All reactions