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

Reply via email to