zsh-workers
 help / color / mirror / code / Atom feed
From: Philippe Troin <phil@fifi.org>
To: Borzenkov Andrey <arvidjaar@newmail.ru>
Cc: <zsh-workers@sunsite.dk>
Subject: Re: Re[2]: SIGTTOU old problem
Date: 28 Feb 2005 07:23:52 -0800	[thread overview]
Message-ID: <87mztobtdj.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <20050228142904.21251.qmail@flock1.newmail.ru>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

Borzenkov Andrey <arvidjaar@newmail.ru> 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@fifi.org>

	* 20886: configure.ac: Use TTOU with trap rather than SIGTTOU.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: zsh-ttou.patch --]
[-- Type: text/x-patch, Size: 877 bytes --]

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);;

  reply	other threads:[~2005-02-28 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-28 13:41 Borzenkov Andrey
2005-02-28 14:13 ` Peter Stephenson
2005-02-28 14:24   ` Peter Stephenson
2005-02-28 14:29 ` Philippe Troin
2005-02-28 14:29   ` Re[2]: " Borzenkov Andrey
2005-02-28 15:23     ` Philippe Troin [this message]
2005-03-14  7:54       ` Philippe Troin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mztobtdj.fsf@ceramic.fifi.org \
    --to=phil@fifi.org \
    --cc=arvidjaar@newmail.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).