From a0cd7c31973764af301e8ec535329c5e8122729e Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 26 Jul 2010 10:59:32 +0000 Subject: [PATCH] even if you write signal handlers to not do anything stupid when you're not on a terminal, they STILL interrupt long system calls and cause sysread to fail, so disable them when they're not needed. problem found by mlarkin@ this is just a band-aid, I guess I really need to "reset" non-needed signals globally whenever I fork... sigh. --- usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index dda5a0fdd28..db89b8192cb 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.86 2010/07/02 12:41:43 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.87 2010/07/26 10:59:32 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -543,6 +543,8 @@ sub open_pipe if ($pid2) { $object->{pid2} = $pid2; } else { + undef $SIG{'WINCH'}; + undef $SIG{'CONT'}; open STDERR, '>', $object->{errors}; open(STDOUT, '>&', $wrfh) or $self->{state}->fatal("Bad dup: #1", $!); -- 2.20.1