Hi, On Sat, 19 Nov 2016 19:58:59 +0100 Patrik Lundin <pat...@sigterm.se> wrote:
> On Sat, Nov 19, 2016 at 06:27:16PM +0100, Marc Espie wrote: > > Wondering if your script isn't passing some weird signal handling > > (such as ignoring some signals) through. > > > > Seems like you are on to something :). > > Some googling led me here: > https://blog.nelhage.com/2010/02/a-very-subtle-bug/ > > It talks about how python ignores SIGPIPE and shows how it can be > worked around when using subprocess.Popen. > > I can solve the problem by adding the following line > in /usr/sbin/pkg_add: > === > $SIG{PIPE} = 'DEFAULT'; > === > thank you Patrik. I just wanted to report that this solved the problem I am having with this since 1.5 months as well. Please read http://marc.info/?l=openbsd-misc&m=147544336719598&w=2 for details. I know this is not a final solution but you seem to have a deeper understanding of this than I have. regards Lars