From 38f3e3e7ba210bbc45c2077102c308ed8abae061 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 8 Jun 2025 16:32:01 -0400 Subject: *.sh: Don't shadow the global nproc This avoids the need for the bash 3 workaround of running command nproc in a subshell. --- tests/util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/util.sh') diff --git a/tests/util.sh b/tests/util.sh index e3eca60..1718a1a 100644 --- a/tests/util.sh +++ b/tests/util.sh @@ -194,9 +194,9 @@ pop_defers() { ## Parallelism # Get the number of processors -nproc() { +_nproc() { { - (command nproc) \ + nproc \ || sysctl -n hw.ncpu \ || getconf _NPROCESSORS_ONLN \ || echo 1 -- cgit v1.2.3