Fix fim not exiting when keys to exit are pressed (refuses to kill the process) #8
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: PiFrame/piframe-go#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://bigkevmcd.github.io/go/pgrp/context/2019/02/19/terminating-processes-in-go.html
https://stackoverflow.com/questions/11886531/terminating-a-process-started-with-os-exec-in-golang
This was due to the bash process executing fim and the Kill() method only killing the main process, NOT sub processes (this is documented in the go docs as a quirk)
Solution was to use progress groups (NON PORTABLE, NO WINDOWS SUPPORT) and kill the whole process group.