[build] do not output errors when pid_max does not exist

Summary: This was spamming the build output on osx.

Reviewed By: ezgicicek

Differential Revision: D23190091

fbshipit-source-id: 9ad33655f
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent 21e9b1823d
commit fd16236b07

@ -128,8 +128,12 @@ endif
MAKE := $(MAKE) INTERACTIVE=$(INTERACTIVE) MAKE := $(MAKE) INTERACTIVE=$(INTERACTIVE)
# 9999999 PIDs ought to be enough for anybody, but check if pid_max can be found just in case # check if pid_max can be found else default to whatever
MAX_PID_SIZE = $(shell echo $$(( $$(wc -m < /proc/sys/kernel/pid_max 2>/dev/null) - 1 )) || echo 7) KERNEL_PID_MAX_FILE = /proc/sys/kernel/pid_max
MAX_PID_SIZE = $(shell \
[ -r $(KERNEL_PID_MAX_FILE) ] \
&& echo $$(( $$(wc -m < $(KERNEL_PID_MAX_FILE)) - 1 )) \
|| echo 5)
# Arguments: # Arguments:
# $(1) is a string describing the command # $(1) is a string describing the command

Loading…
Cancel
Save