mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
FactoidModuleLauncher: timeout now configurable via registry
This commit is contained in:
parent
a82f580f58
commit
64ad929de6
@ -111,8 +111,9 @@ sub execute_module {
|
||||
|
||||
my ($exitval, $stdout, $stderr) = eval {
|
||||
my @cmdline = ("./$module", $self->{pbot}->{interpreter}->split_line($stuff->{arguments}));
|
||||
my $timeout = $self->{pbot}->{registry}->get_value('general', 'module_timeout') // 30;
|
||||
my ($stdin, $stdout, $stderr);
|
||||
run \@cmdline, \$stdin, \$stdout, \$stderr, timeout(10);
|
||||
run \@cmdline, \$stdin, \$stdout, \$stderr, timeout($timeout);
|
||||
my $exitval = $? >> 8;
|
||||
return ($exitval, $stdout, $stderr);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user