We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b2e036 commit bf34518Copy full SHA for bf34518
1 file changed
src/giph
@@ -7,12 +7,21 @@ function handle_usr1(){
7
# Ensure giph only receives SIGUSR1 ONCE
8
if [[ -n $FFMPEG_PID && "$signal_usr1_handled" == false ]]; then
9
signal_usr1_handled=true
10
- kill $FFMPEG_PID
+ kill $FFMPEG_PID
11
wait $FFMPEG_PID
12
fi
13
}
14
15
+function handle_usr2(){
16
+ if [[ -n $FFMPEG_PID ]]; then
17
+ kill -KILL $FFMPEG_PID
18
+ fi
19
+ delete_temporary_directory
20
+ exit 1
21
+}
22
+
23
trap handle_usr1 SIGUSR1
24
+trap handle_usr2 SIGUSR2
25
26
readonly VERSION=1.1.1
27
@@ -493,9 +502,10 @@ function stop_all_recordings() {
493
502
494
503
495
504
496
-# Todo
497
505
function abort_all_recordings() {
498
- :
506
+ for pid in $(pgrep -f "bash.+giph"); do
507
+ kill -USR2 -$pid
508
+ done
499
509
500
510
501
511
if [ -n "$SHOULD_STOP" ]; then
0 commit comments