IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Else we get the following warning:
Subroutine PVE::ProcFSTools::getcwd redefined at /usr/share/perl/5.20/Exporter.pm line 66.
at /usr/share/perl5/PVE/ProcFSTools.pm line 9.
In future, we want to have a separate PVE::CLI::$binname class
for each binary. We can then simply load that class to verify
the API:
use PVE::CLI::pct;
PVE::CLI::pct->verify_api();
or to generate the docs:
PVE::CLI::pct->generate_pod_manpage();
Perl by default interprets + as a parameter prefix, which
means commands like `pct resize 103 rootfs +1G` error with
'Unknown option: 1g', we don't want that.
added 'extra-args' standard option
added 'extra-args' handling to PVE::JSONSchema::get_options
untainting 'extra-args' separately in RESTHandler::handle
We use Net::Ping twice in pve-storage (once for ISCSIPlugin
and once in GlusterfsPlugin, both with the 'tcp' variant.),
but Net::Ping doesn't support IPv6.
The following situations could lead to the 'unknown error':
1) As commented, when the alarm triggered after the first
signal handler was installed and before the new alarm was
installed. In this case the $signalcount was increased,
and worse: the original signal handler was never called.
2) When $code died, since the call itself wasn't in an eval
block, we'd leave the eval block containing the inner alarm
signal handler. Then there's a time window from leaving the
signal block (and with that restoring the first installed
only-counting signal-handler) and reaching the code to
restore the previous alarm where the counting alarm handler
could get triggered by our own alarm set before running
$code. In this case at least the the old alarm would be
restored, but we'd still trigger the 'unknown error'.
The new code starts off by suspending the original alarm
before installing any signal handler, then installing the
timeout handler inside the first eval block. The $code is
then run inside another eval block to make sure we reach the
alarm(0) statement before restoring the old signal handler
and alarm timeout.
Added a generic function to split a host+port string to the
host and port part supporting the two most common ipv6
notations beside domains and ipv4: with brackets for the
address or a dot as port separator.
The old code used string substitution for every line of the
input string, while perl can also iterate over all matches
via the /g re modifier, and can turn ^ and $ to act as
beginning/end of line via the /m modifier.
Effectively allowing a "match over all lines" via a simple
while ($data =~ /^.*$/gm);
The situation is a little different in SectionConfig because
there's a nested loop invovled which doesn't work with /g.
For this there are two options and I chose the safer one by
simply doing a split on newlines first.
The alternative would be to open the data as a
filehandle-to-string and use <$fh> to read lines, however
I'd have to throw in an eval{} to be sure to close the
handle afterwards.