[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.6-51-gda155b5



The following commit has been merged in the master branch:
commit f9fef87d20cc2e8f75201ef6bd8635f7bd1bce38
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Sun Mar 1 15:11:30 2009 -0600

    Add background support to Lintian::Command
    
    Add support for "command &"-like way to send process to background when
    pipes are used.

diff --git a/lib/Lintian/Command.pm b/lib/Lintian/Command.pm
index 32f7cdf..530f2df 100644
--- a/lib/Lintian/Command.pm
+++ b/lib/Lintian/Command.pm
@@ -195,7 +195,13 @@ sub spawn {
 	    }
 	    $opts->{harness} = harness($cmd, @in, @out, @err);
 	} else {
-	    my $first = shift @cmds;
+	    my ($first, $last) = (shift @cmds, pop @cmds);
+	    # Support shell-style "command &"
+	    if ($last eq '&') {
+		$background = 1;
+	    } else {
+		push @cmds, $last;
+	    }
 	    $opts->{harness} = harness($first, @in, @cmds, @out, @err);
 	}
 	if ($background) {

-- 
Debian package checker


Reply to: