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

[lintian] 01/02: L::C::S: Remove unused background_dir



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 4f226902d83ad1395f7a89ddd4ccd8d1bf1eae70
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Jan 23 14:19:45 2016 +0000

    L::C::S: Remove unused background_dir
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Command/Simple.pm | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)

diff --git a/lib/Lintian/Command/Simple.pm b/lib/Lintian/Command/Simple.pm
index 53af6d3..c9507c7 100644
--- a/lib/Lintian/Command/Simple.pm
+++ b/lib/Lintian/Command/Simple.pm
@@ -22,7 +22,7 @@ use autodie qw(open close chdir);
 use Exporter qw(import);
 use POSIX qw(:sys_wait_h);
 
-our @EXPORT_OK = qw(rundir background background_dir wait_any kill_all);
+our @EXPORT_OK = qw(rundir background wait_any kill_all);
 
 =head1 NAME
 
@@ -114,36 +114,6 @@ sub background {
     }
 }
 
-=item background_dir(dir, command, argument  [, ...])
-
-Executes the given C<command> with the given arguments asynchronously
-in dir and returns the process id of the child process.
-
-A return value of -1 indicates an error. This can either be a problem
-when calling CORE::fork() or when trying to run another command before
-calling wait() to reap the previous command.
-
-=cut
-
-sub background_dir {
-    my $pid = fork();
-
-    if (not defined($pid)) {
-        # failed
-        return -1;
-    } elsif ($pid > 0) {
-        # parent
-        return $pid;
-    } else {
-        # child
-        my $dir = shift;
-        close(STDIN);
-        open(STDIN, '<', '/dev/null');
-        chdir($dir);
-        CORE::exec @_ or die("Failed to exec '$_[0]': $!\n");
-    }
-}
-
 =item wait_any (hashref[, nohang])
 
 When starting multiple processes asynchronously, it is common to wait

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: