X-Recipient: archive-cygwin AT delorie DOT com 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 Message-ID: <5059AFD1.9050501@ptc.com> Date: Wed, 19 Sep 2012 13:43:13 +0200 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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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