From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3750 invoked from network); 28 Feb 2005 15:24:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Feb 2005 15:24:31 -0000 Received: (qmail 66244 invoked from network); 28 Feb 2005 15:24:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Feb 2005 15:24:25 -0000 Received: (qmail 11922 invoked by alias); 28 Feb 2005 15:24:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20891 Received: (qmail 11910 invoked from network); 28 Feb 2005 15:24:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Feb 2005 15:24:18 -0000 Received: (qmail 65920 invoked from network); 28 Feb 2005 15:24:18 -0000 Received: from tantale.fifi.org (64.81.251.130) by a.mx.sunsite.dk with SMTP; 28 Feb 2005 15:24:11 -0000 Received: from ceramic.fifi.org (Debian-exim@ceramic.fifi.org [64.81.251.131]) by tantale.fifi.org (8.9.3p2/8.9.3/Debian 8.9.3-21) with ESMTP id HAA18682; Mon, 28 Feb 2005 07:23:53 -0800 Received: from phil by ceramic.fifi.org with local (Exim 4.34) id 1D5mkS-0000R4-MF; Mon, 28 Feb 2005 07:23:52 -0800 To: Borzenkov Andrey Cc: Subject: Re: Re[2]: SIGTTOU old problem References: <20050228142904.21251.qmail@flock1.newmail.ru> Mail-Copies-To: nobody From: Philippe Troin Date: 28 Feb 2005 07:23:52 -0800 Message-ID: <87mztobtdj.fsf@ceramic.fifi.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 --=-=-= Content-Type: text/plain; charset=iso-8859-5 Content-Transfer-Encoding: quoted-printable Borzenkov Andrey writes: > Hello Philippe Troin=20 >=20 > =BF=DD, 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=20 > PT> Why? What does it buy? > PT>=20 >=20 > 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 * 20886: configure.ac: Use TTOU with trap rather than SIGTTOU. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=zsh-ttou.patch 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);; --=-=-=--