summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/gf/gforth/use-nproc-instead-of-fhs.patch
blob: b4dec2626a5494b6254bf60d2a559f677eb38f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git i/cilk.fs w/cilk.fs
index 9c675d06..df858f3d 100644
--- i/cilk.fs
+++ w/cilk.fs
@@ -25,9 +25,8 @@ e? os-type 2dup s" darwin" string-prefix? -rot s" openbsd" string-prefix? or [IF
     s>number drop
     r> free throw
 [ELSE] e? os-type s" linux" search nip nip [IF]
-	s" /sys/devices/system/cpu/present" slurp-file over >r
-	#lf -scan '-' $split 2nip
-	s>number drop 1+
+	s" nproc" r/o open-pipe throw slurp-fid over >r
+	s>number drop
 	r> free throw
     [ELSE]
 	1 \ we don't know