summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2018-11-13 20:35:30 +0000
committerNiels Thykier <niels@thykier.net>2018-11-13 20:35:38 +0000
commitfff0f01c4ceb910ec4d0455718a2f60e22463792 (patch)
treecf9aa620456d3111546aa12ffd5d9e93b47920c6 /lib
parenta884723efd1b8198f228e1fe173c439494a1d7ee (diff)
downloaddebhelper-fff0f01c4ceb910ec4d0455718a2f60e22463792.tar.gz
Dh_Lib,dh_installman: Reopen stdin for reading in doit/man(1)-check
This make debhelper work when run under nohup(1), which opens stdin for writing. Trivial to test with: dpkg-buildpackage [...] 0>/dev/null (Once you know that you are looking for it). Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Debian/Debhelper/Dh_Lib.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
index aa7448bc..482e758e 100644
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -456,6 +456,7 @@ sub _doit {
chdir($dir) or error("chdir(\"${dir}\) failed: $!");
}
}
+ open(STDIN, '<', '/dev/null') or error("redirect STDIN failed: $!");
if (defined(my $output = $options->{stdout})) {
open(STDOUT, '>', $output) or error("redirect STDOUT failed: $!");
}