Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Re[2]: SIGTTOU old problem
- X-seq: zsh-workers 20891
- From: Philippe Troin <phil@xxxxxxxx>
- To: Borzenkov Andrey <arvidjaar@xxxxxxxxxx>
- Subject: Re: Re[2]: SIGTTOU old problem
- Date: 28 Feb 2005 07:23:52 -0800
- Cc: <zsh-workers@xxxxxxxxxx>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050228142904.21251.qmail@xxxxxxxxxxxxxxxxx>
Borzenkov Andrey <arvidjaar@xxxxxxxxxx> writes:
> Hello Philippe Troin
>
> Пн, 28.02.2005 18:29:43 you wrote:
> PT> > - trap "" SIGTTOU > /dev/null 2>&1 || :
> PT> > + ( trap "" SIGTTOU > /dev/null 2>&1 ) && trap "" SIGTTOU > /dev/null 2>&1
> PT> Why? What does it buy?
> PT>
>
> SUS specifies that trap is special builtin so error in "trap" should
> terminate non-interactive shell. On my system (and as Peter hinted
> probably everywhere else) trap SIGTTOU is invalid (trap TTOU is
> valid) so configure exits without any chance to see || :.
Got to love these "special" builtins. Yet another kind of weird
dehavior.
> To the author of original check - please test if my patch works for
> you as intended and I commit it. Alternative is to change it into
> "trap "" TTOU" that is likely to be more portable.
This will work as intended. I'd rather use TTOU since it's more
portable.
Patch enclosed.
Phil.
2005-02-28 Philippe Troin <phil@xxxxxxxx>
* 20886: configure.ac: Use TTOU with trap rather than SIGTTOU.
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.29
diff -b -u -r1.29 configure.ac
--- configure.ac 24 Feb 2005 16:53:09 -0000 1.29
+++ configure.ac 28 Feb 2005 15:22:59 -0000
@@ -1863,7 +1863,7 @@
if test "x$ac_cv_func_tcsetpgrp" = xyes; then
case "x$zsh_working_tcsetpgrp" in
xcheck)
- trap "" SIGTTOU > /dev/null 2>&1 || :
+ trap "" TTOU > /dev/null 2>&1 || :
AC_CACHE_CHECK(if tcsetpgrp() actually works,
zsh_cv_sys_tcsetpgrp,
[AC_TRY_RUN([
@@ -1894,7 +1894,7 @@
Try running configure with --with-tcsetpgrp or --without-tcsetpgrp]);;
*) AC_MSG_ERROR([unexpected return status]);;
esac
- trap - SIGTTOU > /dev/null 2>&1 || :
+ trap - TTOU > /dev/null 2>&1 || :
;;
xyes) :;;
xno) AC_DEFINE(BROKEN_TCSETPGRP);;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author