From fff0f01c4ceb910ec4d0455718a2f60e22463792 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Tue, 13 Nov 2018 20:35:30 +0000 Subject: 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 --- debian/changelog | 11 +++++++++++ dh_installman | 2 +- lib/Debian/Debhelper/Dh_Lib.pm | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 39517595..f69a7edc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (11.5.4) UNRELEASED; urgency=medium + + * Dh_Lib.pm: Reopen stdin to read from /dev/null in doit (and its sibling + functions) to prevent issues when stdin is open in write-only mode + (which is what nohup(1) does). Thanks to Julian Gilbey for reporting + the issue and providing a sample patch for it as well. + (Closes: #913663) + * dh_installman: Ditto. + + -- Niels Thykier Tue, 13 Nov 2018 20:30:49 +0000 + debhelper (11.5.3) unstable; urgency=medium [ Helmut Grohne ] diff --git a/dh_installman b/dh_installman index a41d9c8e..96d6c7a5 100755 --- a/dh_installman +++ b/dh_installman @@ -272,7 +272,7 @@ on_items_in_parallel(\@all_packages, sub { }); # Now utf-8 conversion. -if (defined `man --version`) { +if (defined `man --version {stdout})) { open(STDOUT, '>', $output) or error("redirect STDOUT failed: $!"); } -- cgit v1.2.3