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