Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: strange behavior

On Jan 28,  3:44pm, Vincent Lefevre wrote:
} Subject: Re: strange behavior
} On 2010-11-16 04:10:23 +0100, Vincent Lefevre wrote:
} > On 2010-11-15 09:24:38 -0800, Bart Schaefer wrote:
} > > 
} > > It appears to me that it must be the case that
} > > 	svn "$@"
} > > is exiting with status 141, rather than that the filter function is
} > > killing its parent with a PIPE signal.
} While the problem described above was not rare, since I modified
} the script in the following way (two months ago), I can no longer
} see the problem.
} -{ svn "$@"; st=$?; echo "svnwrapper:term" >&2 } 2>>(filter)
} +{
} +  svn "$@"
} +  st=$?
} +  [[ $st -eq 141 ]] && echo "Exit with status 141!" >&2
} +  echo "svnwrapper:term" >&2
} +} 2>>(filter)

I forget whether we covered this before, but does {svn "$@"} ever
fork as part of its execution?

There has to be some kind of race condition here.  2>>(filter) runs
filter in the background, so if something behind svn also runs as an
separate process, it could be possible for the filter to exit and
close it's stdin (thereby closing everything else's stdder) before
operating-system-level exit-time buffer-flushing has finished.
} So, either the problem has been fixed somewhere or it can no longer
} be seen due to the change in my script. In the latter case, it is
} probably a bug in zsh. I'm going to revert this change and see if
} I can see the problem again...

Hmm, another thought ... maybe the "zsh: exit 141" is coming from
the shell's exit-time handling of the "filter" program, rather than
from svn.  I've lost enough context here that I don't recall whether
that was previously ruled out too.

Messages sorted by: Reverse Date, Date, Thread, Author