restart: only suppress warnings of the 'exec' category
"Statement unlikely to be reached" is the expected warning here.
This commit is contained in:
parent
4664245b8b
commit
4f0954b2dc
1 changed files with 3 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
||||||
#!perl
|
#!perl
|
||||||
|
|
||||||
|
|
||||||
HELP "restart" => "Attempt to restart the RevBank shell";
|
HELP "restart" => "Attempt to restart the RevBank shell";
|
||||||
|
|
||||||
sub command :Tab(restart) ($self, $cart, $command, @) {
|
sub command :Tab(restart) ($self, $cart, $command, @) {
|
||||||
return NEXT if $command ne 'restart';
|
return NEXT if $command ne 'restart';
|
||||||
|
|
||||||
no warnings;
|
|
||||||
call_hooks("restart_exec");
|
call_hooks("restart_exec");
|
||||||
|
no warnings qw(exec);
|
||||||
exec $0;
|
exec $0;
|
||||||
call_hooks("restart_survived");
|
call_hooks("restart_survived");
|
||||||
|
|
||||||
|
@ -16,8 +17,8 @@ sub command :Tab(restart) ($self, $cart, $command, @) {
|
||||||
sub hook_input($class, $cart, $input, $split_input, @) {
|
sub hook_input($class, $cart, $input, $split_input, @) {
|
||||||
return if defined $input;
|
return if defined $input;
|
||||||
|
|
||||||
no warnings;
|
|
||||||
call_hooks("restart_restart");
|
call_hooks("restart_restart");
|
||||||
|
no warnings qw(exec);
|
||||||
exec $0;
|
exec $0;
|
||||||
call_hooks("restart_survived");
|
call_hooks("restart_survived");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue