zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: strange behavior
Date: Fri, 28 Jan 2011 07:49:15 -0800	[thread overview]
Message-ID: <110128074915.ZM5855@torch.brasslantern.com> (raw)
In-Reply-To: <20110128144412.GA22306@ypig.lip.ens-lyon.fr>

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.


  reply	other threads:[~2011-01-28 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 12:09 Vincent Lefevre
2010-11-15 16:32 ` Vincent Lefevre
2010-11-15 17:24   ` Bart Schaefer
2010-11-16  3:10     ` Vincent Lefevre
2011-01-28 14:44       ` Vincent Lefevre
2011-01-28 15:49         ` Bart Schaefer [this message]
2011-01-30  0:37           ` Vincent Lefevre
2011-01-30 22:25             ` Bart Schaefer
2011-01-31  9:11               ` Vincent Lefevre
2011-04-11 14:26               ` Vincent Lefevre
2011-04-11 14:39                 ` Vincent Lefevre
2011-04-11 15:15                   ` Peter Stephenson
2011-04-28 11:32                     ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=110128074915.ZM5855@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).