From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32164 invoked by alias); 19 Sep 2012 11:43:34 -0000 Received: (qmail 32153 invoked by uid 22791); 19 Sep 2012 11:43:33 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from irp2.ptc.com (HELO irp2.ptc.com) (12.11.148.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Sep 2012 11:43:16 +0000 Received: from hq-x10prdhub1.ptcnet.ptc.com ([132.253.198.27]) by irp2.ptc.com with ESMTP; 19 Sep 2012 07:43:15 -0400 Received: from [10.95.20.25] (132.253.198.6) by int-mail.ptc.com (132.253.198.27) with Microsoft SMTP Server id 14.2.309.2; Wed, 19 Sep 2012 07:43:14 -0400 Message-ID: <5059AFD1.9050501@ptc.com> Date: Wed, 19 Sep 2012 13:05:00 -0000 From: Roeder Roland User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Subject: Re: tcsh hang while executing scripts which use pipes with backticks Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-09/txt/msg00226.txt.bz2 After various different attempts to nail down this issue I have some hope now that I have found a fix for it. I analyzed the changes of last to current version of tcsh and found one that is related to context of the problem and somewhat suspicious as well. The change I did then was the following: $ diff -uN sh.glob.c.orig sh.glob.c --- sh.glob.c.orig 2012-09-17 13:20:26.212401000 +0200 +++ sh.glob.c 2012-09-17 13:20:23.916171400 +0200 @@ -787,7 +787,7 @@ /* The F_BACKQ flag must set so the job output is correct if * printexitvalue is set. If it's not set, the job output * will have "Exit N" appended where N is the exit status. */ - t->t_dflg = F_BACKQ|F_NOFORK; + t->t_dflg |= (F_BACKQ); /*|F_NOFORK);*/ if (seterr) stderror(ERR_OLD); #ifdef SIGTSTP The comment along with the change of t_dflg was added in latest tcsh release. Main change from me was to not set F_NOFORK. That fixed my test case. Whether or not it is ok to overwrite t_dflg or simply add the bit I can't say. I tried both. It made no difference for my test case. I know that this is probably not the right forum to post this, since the issues seems to be in tcsh but not in cygwin. However, I thought I post it here for the other folks suffering from this problem as well. Maybe they want to try the fix as well. regards -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple