Make giph stop all previous recordings properly
I'm new to giph and I love the tiny and elegant program very much! But sometimes I find giph --stop not working properly. After investigating, I find two main problems:
"$(pgrep -f "bash.+giph")"will return all pids as a single string. So after starting multiple giph records,giph --stopcan only stop at most one previous record.- Currently when executing
giph --stop, It will send SIGINT to all running giph processes as well as their child processes. This has caused me some trouble because I'm using keyboard shortcut and when I accidently executed this command twice, theencode()bash function will be interrupted. So I will lose all the screen records and only get an empty gif file. I modifiedstop_all_recordingsin order to kill giph's record child process accurately.
Hey @rqdmap!
Stopping all recordings reliable has been an issue in many different setups, every time someone thinks they have the solution, someone else comes up reporting it doesn't work on their system.
That out of the way, I'm currently not using an x11 environment, which makes this impossible for me to test, so I have to gain confidence in this change another way, but I don't quite understand the whole change. So let me ask some questions in a review to fully understand it.
Please take your time with the changes, no rush. I hope to create a new release when this and #23 are both merged, and I'm not sure if I'll get an answer on #23 any time soon as I haven't given feedback on it in a very long time.
That's great. Looking forward to the new release! :)