Skip to content

Commit

Permalink
Merge branch 'e-m-b-a:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
m-1-k-3 committed Oct 3, 2022
2 parents b511a40 + 312bd12 commit bf8b524
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/S99_grepit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ S99_grepit() {
local GREPIT_MODULES=()
local GREPIT_RESULTS=0

local MAX_MOD_THREADS
#MAX_MOD_THREADS=$((1*"$(grep -c ^processor /proc/cpuinfo || true )"))
MAX_MOD_THREADS=1
local MAX_MOD_THREADS=1
local MEM_LIMIT=$(( "$TOTAL_MEMORY"/2 ))


# grepit options:
# Sometimes we look for composite words with wildcard, eg. root.{0,20}detection, this is the maximum
Expand Down Expand Up @@ -151,7 +151,9 @@ grepit_search() {
write_log "" "$LOG_PATH_MODULE/$OUTFILE"
fi

ulimit -Sv "$MEM_LIMIT"
"$GREP_COMMAND" "${ARGS_FOR_GREP[@]}" "${STANDARD_GREP_ARGUMENTS[@]}" -- "$SEARCH_REGEX" "$FIRMWARE_PATH" >> "$LOG_PATH_MODULE/$OUTFILE" 2>&1 || true
ulimit -Sv unlimited

if [[ "$LOG_DETAILS" -eq 1 ]]; then
if [[ -f "$LOG_PATH_MODULE/$OUTFILE" ]] && ! [[ $(grep -v -c -E "\ Searching\ \(" "$LOG_PATH_MODULE/$OUTFILE" 2>/dev/null) -gt 7 ]]; then
Expand Down

0 comments on commit bf8b524

Please sign in to comment.