Lines get mangled when running with multiple processes
Here is an example:
The command is: ../CodePolicy/bin/otobo.CodePolicy.pl --plugins +TidyAll::Plugin::OTOBO::Perl::PerlCritic -a 2>&1 | tee critic.out
[checked] Kernel/System/Console/Command/Maint/PostMaster/Read.pm
[checked] Kernel/System/Console/Command/Maint/SMIME/KeysRefr first
See page 178 of PBP
Subroutines::RequireArgUnpacking violated at line 212 column 1 (Severity: 4)
Always unpack @_ first
See page 178 of PBP
Subroutines::RequireArgUnpacking violated at line 265 column 1 (Severity: 4)
Always unpack @_ first
See page 178 of PBP[0m
I haven't investigated where the writing to STDOUT really takes place. My hunch is that Code::TidyAll by itself handles the locking of STDOUT just fine. Maybe Kernel::TidyAll::OTOBO
messes things up. The module does fork, but Code::TidyAll forks too, using Parallel::ForkManager
.
In Kernel::TidyAll::OTOBO
therej is also the dubious code comment:
# TidyAll's built-in --jobs flag is not used, it seems to be way too slow,
# perhaps because of forking for each single job.