mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Restore 'set -b'/'set -o notify' functionality (#74)
'set -b' had no effect; it should cause the shell to notify job state changes immediately instead of waiting for the next prompt. This fixes a regression that was introduced in ksh93t 2008-07-25. The bugfix is from: https://github.com/att/ast/pull/1089 src/cmd/ksh93/sh/jobs.c: - Save the tty wait state and avoid changing it if TTYWAIT was already on to avoid breaking 'set -b'. The last 'sh_offstate' is inside of an '#if' directive because it is only required when ksh is compiled with SHOPT_COSHELL enabled. src/cmd/ksh93/tests/pty.sh: - Add a regression test for 'set -b' in interactive shells.
This commit is contained in:
parent
39692fc3f6
commit
fc655f1a26
4 changed files with 26 additions and 3 deletions
|
@ -549,5 +549,16 @@ r ^:test-2: true string\\r\\n$
|
|||
!
|
||||
done
|
||||
|
||||
# err_exit #
|
||||
tst $LINENO <<"!"
|
||||
L notify job state changes
|
||||
|
||||
# 'set -b' should immediately notify the user about job state changes.
|
||||
|
||||
p :test-1:
|
||||
w set -b; sleep .01 &
|
||||
u Done
|
||||
!
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue