File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ slog show_infor_text_2 "$show_infor_text_2"
548548<group>
549549<action icon="' ` urlpng cpu` ' " warning="' $project_text_13 ' " shell="hidden" >
550550<title>' $project_text_12 ' </title>
551- <param name="use_cpu" label="' $option_text ' " option-sh="seq 1 $(nproc --all)" value-sh="glog use_cpu $(nproc --all) " />
551+ <param name="use_cpu" label="' $option_text ' " option-sh="seq 1 $(nproc --all)" value-sh="glog use_cpu" />
552552<set>slog use_cpu "$use_cpu"</set>
553553</action>
554554</group>'
Original file line number Diff line number Diff line change 7979
8080# Giới hạn cpu
8181if command -v taskset & > /dev/null; then
82- use_cpu=" $( slog use_cpu) "
83- if [ -n " $use_cpu " ] && [ " $use_cpu " -lt $( nproc --all) ]; then
82+ max_cpu=" $( nproc --all) "
83+ use_cpu=" $( slog use_cpu $max_cpu ) "
84+ if [ -n " $use_cpu " ] && [ " $use_cpu " -lt $max_cpu ]; then
8485 mask=$(( (1 << use_cpu) - 1 ))
85- mask_hex=$( printf " %x" " $mask " )
86+ mask_hex=" $( printf " %x" " $mask " ) "
8687 taskset -p " $mask_hex " $$ & > /dev/null
8788 fi
8889fi
You can’t perform that action at this time.
0 commit comments