mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Fix creation of child process
Using "$0" as the name of the executable seems to work as long as "$0" contains a directory name (e.g, "workingfiles/testssl.sh"), but not if it is just the name of the executable (e.g., "testssl.sh"). Specifying "$RUN_DIR/$PROG_NAME" seems to work in both cases, since if "$0" doesn't contain any path information, `$RUN_DIR` is `.`
This commit is contained in:
parent
6633d0e549
commit
f094013aeb
@ -11763,7 +11763,7 @@ run_mass_testing() {
|
||||
draw_line "=" $((TERM_WIDTH / 2)); outln;
|
||||
outln "$(create_cmd_line_string "$0" "${MASS_TESTING_CMDLINE[@]}")"
|
||||
"$first" || fileout_separator # this is needed for appended output, see #687
|
||||
CHILD_MASS_TESTING=true "$0" "${MASS_TESTING_CMDLINE[@]}" # we call ourselves here. $do_mass_testing is the parent, $CHILD_MASS_TESTING... you figured
|
||||
CHILD_MASS_TESTING=true "$RUN_DIR/$PROG_NAME" "${MASS_TESTING_CMDLINE[@]}" # we call ourselves here. $do_mass_testing is the parent, $CHILD_MASS_TESTING... you figured
|
||||
first=false
|
||||
done < "${FNAME}"
|
||||
return $?
|
||||
@ -11802,7 +11802,7 @@ run_mass_testing_parallel() {
|
||||
# if the JSON file doesn't already exist.
|
||||
"$JSONHEADER" && echo -n "" > "$TEMPDIR/jsonfile_$(printf "%08d" $NR_PARALLEL_TESTS).json"
|
||||
PARALLEL_TESTING_CMDLINE[NR_PARALLEL_TESTS]="$(create_cmd_line_string "$0" "${MASS_TESTING_CMDLINE[@]}")"
|
||||
CHILD_MASS_TESTING=true "$0" "${MASS_TESTING_CMDLINE[@]}" > "$TEMPDIR/term_output_$(printf "%08d" $NR_PARALLEL_TESTS).log" &
|
||||
CHILD_MASS_TESTING=true "$RUN_DIR/$PROG_NAME" "${MASS_TESTING_CMDLINE[@]}" > "$TEMPDIR/term_output_$(printf "%08d" $NR_PARALLEL_TESTS).log" &
|
||||
PARALLEL_TESTING_PID[NR_PARALLEL_TESTS]=$!
|
||||
NR_PARALLEL_TESTS+=1
|
||||
sleep $PARALLEL_SLEEP
|
||||
|
Loading…
Reference in New Issue
Block a user