You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hooks/_common.sh
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -206,8 +206,10 @@ function common::get_cpu_num {
206
206
207
207
local cpu_quota cpu_period cpu_num
208
208
209
+
local -r wslinterop_path="/proc/sys/fs/binfmt_misc/WSLInterop"
210
+
209
211
if [[ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us &&
210
-
!-f/proc/sys/fs/binfmt_misc/WSLInterop ]];then# WSL have cfs_quota_us, but WSL should be checked as usual Linux host
212
+
(! -f "${wslinterop_path}"&&! -f "${wslinterop_path}-late"&&! -f "/run/WSL") ]];then# WSL has cfs_quota_us, but WSL should be checked as usual Linux host
0 commit comments