mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-24 10:54:42 +08:00
Disable asynchronous job notification for parallel tests.
* lib/autotest/general.m4 (AT_INIT) <Driver loop>: Turn off notify mode, since zsh leaves it on after 'emulate sh'. * doc/autoconf.texi (Limitations of Builtins) <set>: Document that job control options are not portable. Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
parent
2b5b0dda48
commit
d8db042ad0
@ -1,5 +1,11 @@
|
|||||||
2009-07-13 Eric Blake <ebb9@byu.net>
|
2009-07-13 Eric Blake <ebb9@byu.net>
|
||||||
|
|
||||||
|
Disable asynchronous job notification for parallel tests.
|
||||||
|
* lib/autotest/general.m4 (AT_INIT) <Driver loop>: Turn off notify
|
||||||
|
mode, since zsh leaves it on after 'emulate sh'.
|
||||||
|
* doc/autoconf.texi (Limitations of Builtins) <set>: Document that
|
||||||
|
job control options are not portable.
|
||||||
|
|
||||||
Guarantee that exit status trumps output matching.
|
Guarantee that exit status trumps output matching.
|
||||||
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document this
|
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document this
|
||||||
better.
|
better.
|
||||||
|
@ -16257,6 +16257,35 @@ Thus, when writing a script in M4sh, rather than trying to rely on
|
|||||||
@samp{set -e}, it is better to append @samp{|| AS_EXIT} to any
|
@samp{set -e}, it is better to append @samp{|| AS_EXIT} to any
|
||||||
statement where it is desirable to abort on failure.
|
statement where it is desirable to abort on failure.
|
||||||
|
|
||||||
|
@cindex @command{set -b}
|
||||||
|
@cindex @command{set -m}
|
||||||
|
Job control is not provided by all shells, so the use of @samp{set -m}
|
||||||
|
or @samp{set -b} must be done with care. When using @command{zsh} in
|
||||||
|
native mode, asynchronous notification (@samp{set -b}) is enabled by
|
||||||
|
default, and using @samp{emulate sh} to switch to Posix mode does not
|
||||||
|
clear this setting (although asynchronous notification has no impact
|
||||||
|
unless job monitoring is also enabled). Also, @command{zsh} 4.3.10 and
|
||||||
|
earlier have a bug where job control can be manipulated in interactive
|
||||||
|
shells, but not in subshells or scripts. Furthermore, some shells, like
|
||||||
|
@command{pdksh}, fail to treat subshells as interactive, even though the
|
||||||
|
parent shell was.
|
||||||
|
|
||||||
|
@example
|
||||||
|
$ @kbd{echo $ZSH_VERSION}
|
||||||
|
4.3.10
|
||||||
|
$ @kbd{set -m; echo $?}
|
||||||
|
0
|
||||||
|
$ @kbd{zsh -c 'set -m; echo $?'}
|
||||||
|
set: can't change option: -m
|
||||||
|
$ @kbd{(set -m); echo $?}
|
||||||
|
set: can't change option: -m
|
||||||
|
1
|
||||||
|
$ @kbd{pdksh -ci 'echo $-; (echo $-)'}
|
||||||
|
cim
|
||||||
|
c
|
||||||
|
@end example
|
||||||
|
|
||||||
|
|
||||||
@item @command{shift}
|
@item @command{shift}
|
||||||
@c ------------------
|
@c ------------------
|
||||||
@prindex @command{shift}
|
@prindex @command{shift}
|
||||||
|
@ -1250,7 +1250,8 @@ dnl shell to start each parallel task as its own shell job, thus as a new
|
|||||||
dnl process group leader. We then send the signal to all new process groups.
|
dnl process group leader. We then send the signal to all new process groups.
|
||||||
|
|
||||||
dnl Do we have job control?
|
dnl Do we have job control?
|
||||||
if (set -m && set +m) >/dev/null 2>&1; then
|
if (set -m && set +m && set +b) >/dev/null 2>&1; then
|
||||||
|
set +b
|
||||||
at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
|
at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
|
||||||
else
|
else
|
||||||
at_job_control_on=: at_job_control_off=: at_job_group=
|
at_job_control_on=: at_job_control_off=: at_job_group=
|
||||||
|
Loading…
Reference in New Issue
Block a user