Avoid inputing twice password when building a package last long
time, in main thread add alarm to execute "sudo -v" periodly.
fix #460
use Data::Dumper;
use File::Basename;
+# "sudo -v" period
+use constant SUDOV_PERIOD => 300;
+
my @threads;
my @exclude = ();
my @repos= ();
$TERM=1;
};
+$SIG{'ALRM'} = sub {
+ {
+ lock ($SUDOV_LOCK);
+ my_system("sudo -v");
+ }
+ alarm(SUDOV_PERIOD);
+};
+
+alarm(SUDOV_PERIOD);
+
while (! $TERM) {
my @order = ();
my @o = ();