From: espie Date: Mon, 26 Jul 2010 10:59:32 +0000 (+0000) Subject: even if you write signal handlers to not do anything stupid when you're X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a0cd7c31973764af301e8ec535329c5e8122729e;p=openbsd 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. --- 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", $!);