Set the VA limit with ulimit -S, and clean up comments.
Other limits are set with -S, do that with the virtual address space limit as well. Change-Id: Ie427341a4c7be56d3e8d96be6c1713c56e9bad87 Reviewed-on: https://code.wireshark.org/review/17846 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
c2b7a74c14
commit
ec0aeb983b
|
@ -206,20 +206,26 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do
|
|||
echo -n "($ARGS) "
|
||||
echo -e "Command and args: $RUNNER $ARGS\n" > $TMP_DIR/$ERR_FILE
|
||||
|
||||
# Run in a child process with limits, e.g. stop it if it's running
|
||||
# longer then MAX_CPU_TIME seconds. (ulimit may not be supported
|
||||
# well on some platforms, particularly cygwin.)
|
||||
# Run in a child process with limits.
|
||||
(
|
||||
# Set some limits to the child processes, e.g. stop it if
|
||||
# it's running longer than MAX_CPU_TIME seconds. (ulimit
|
||||
# is not supported well on cygwin - it shows some warnings -
|
||||
# and the features we use may not all be supported on some
|
||||
# UN*X platforms.)
|
||||
ulimit -S -t $MAX_CPU_TIME -s $MAX_STACK
|
||||
|
||||
# Allow core files to be generated
|
||||
ulimit -c unlimited
|
||||
SUBSHELL_PID=$($SHELL -c 'echo $PPID')
|
||||
|
||||
# Don't enable ulimit -v when using ASAN. See
|
||||
# https://github.com/google/sanitizers/wiki/AddressSanitizer#ulimit--v
|
||||
if [ $ASAN -eq 0 ]; then
|
||||
ulimit -v $MAX_VMEM
|
||||
ulimit -S -v $MAX_VMEM
|
||||
fi
|
||||
|
||||
SUBSHELL_PID=$($SHELL -c 'echo $PPID')
|
||||
|
||||
"$RUNNER" $COMMON_ARGS $ARGS $TMP_DIR/$TMP_FILE \
|
||||
> /dev/null 2>> $TMP_DIR/$ERR_FILE.$SUBSHELL_PID
|
||||
) &
|
||||
|
|
|
@ -84,17 +84,22 @@ while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do
|
|||
echo -n "($ARGS) "
|
||||
echo -e "Command and args: $TSHARK $ARGS\n" > $TMP_DIR/$ERR_FILE
|
||||
|
||||
# Run in a child process with limits, e.g. stop it if it's running
|
||||
# longer then MAX_CPU_TIME seconds. (ulimit may not be supported
|
||||
# well on some platforms, particularly cygwin.)
|
||||
# Run in a child process with limits.
|
||||
(
|
||||
# Set some limits to the child processes, e.g. stop it if
|
||||
# it's running longer than MAX_CPU_TIME seconds. (ulimit
|
||||
# is not supported well on cygwin - it shows some warnings -
|
||||
# and the features we use may not all be supported on some
|
||||
# UN*X platforms.)
|
||||
ulimit -S -t $MAX_CPU_TIME -s $MAX_STACK
|
||||
|
||||
# Allow core files to be generated
|
||||
ulimit -c unlimited
|
||||
|
||||
# Don't enable ulimit -v when using ASAN. See
|
||||
# https://github.com/google/sanitizers/wiki/AddressSanitizer#ulimit--v
|
||||
if [ $ASAN -eq 0 ]; then
|
||||
ulimit -v $MAX_VMEM
|
||||
ulimit -S -v $MAX_VMEM
|
||||
fi
|
||||
|
||||
"$TSHARK" $ARGS $TMP_DIR/$TMP_FILE \
|
||||
|
|
Loading…
Reference in New Issue