The following commit has been merged in the master branch:
commit c5ef3f51dfa6dee1d0b0e1786c295b6778c1ebd8
Author: Niels Thykier <[email protected]>
Date:   Wed Jul 11 17:58:04 2012 +0200

    L::Cmd::Simple: Fix wait()'s return value
    
    It is documented to return "undef" when reaping an "unexpected pid".
    However, it relies on an implicit return to do so and therefore does
    not always behave as documented.
    
    Signed-off-by: Niels Thykier <[email protected]>

diff --git a/lib/Lintian/Command/Simple.pm b/lib/Lintian/Command/Simple.pm
index be2f22f..9b48626 100644
--- a/lib/Lintian/Command/Simple.pm
+++ b/lib/Lintian/Command/Simple.pm
@@ -340,6 +340,9 @@ sub wait {
                 return $cmd;
             }
         }
+        # Unknown pid; per docs we return undef.  Be explicit about it
+        # though because implicit returns can give "funny results".
+        return;
     } elsif (not defined($self)) {
         return (CORE::wait() == -1)? -1 : ($? >> 8);
     } else {

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to