Skip to content
Snippets Groups Projects
Commit 30ea5e8a authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- protect script for STRG-C, closes...

- protect script for STRG-C, closes #4
parent 7ed9c2d5
Branches
No related tags found
No related merge requests found
...@@ -414,6 +414,8 @@ scan_file() { ...@@ -414,6 +414,8 @@ scan_file() {
# try best guess # try best guess
MODE=$(estimate_mode "$mimetype") MODE=$(estimate_mode "$mimetype")
fi fi
trap "" SIGINT
debug "scan_file, === entering protected area ==="
if [ "$STAGE" = "any" ]; then if [ "$STAGE" = "any" ]; then
is_valid=0 is_valid=0
for stage in current upcoming; do for stage in current upcoming; do
...@@ -429,7 +431,9 @@ scan_file() { ...@@ -429,7 +431,9 @@ scan_file() {
is_valid=$(exec_cmd "$cmd" "$ftype" "$MODE" "$stage" "$logname") is_valid=$(exec_cmd "$cmd" "$ftype" "$MODE" "$stage" "$logname")
handle_input_if_requested "$filename" "$is_valid" handle_input_if_requested "$filename" "$is_valid"
fi fi
debug "scan_file, === leaving protected area ==="
trap - SIGINT
debug "---"
} }
scan_dir() { scan_dir() {
...@@ -441,6 +445,7 @@ done ...@@ -441,6 +445,7 @@ done
#### MAIN #### MAIN
get_cli_args "$@" get_cli_args "$@"
#trap signalhandler SIGINT SIGABRT #sigint
if [ "$WITH_PIPE" -eq 1 ]; then if [ "$WITH_PIPE" -eq 1 ]; then
#cli mode, use stdin #cli mode, use stdin
debug "checking stream" debug "checking stream"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment