Skip to content

Commit

Permalink
do not run ksh -i test if SHOPT_SCRIPTONLY (re: 97353a0)
Browse files Browse the repository at this point in the history
  • Loading branch information
McDutchie committed Jan 6, 2024
1 parent 8650c35 commit cf10725
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/ksh93/tests/jobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ wait 2>/dev/null

# ======
# Before 2024-01-05, ksh wrongly printed job numbers for background jobs invoked from subshells in profile scripts.
if((!SHOPT_SCRIPTONLY));then
print '(true &); :' >$tmp/profile
got=$(ENV=$tmp/profile "$SHELL" -i </dev/null 2>&1)
[[ -n $got ]] && err_exit "subshell bg job in profile script prints job number (got $(printf %q "$got"))"
fi # !SHOPT_SCRIPTONLY

# ======
exit $((Errors<125?Errors:125))

0 comments on commit cf10725

Please sign in to comment.