SquirrelMail Script Installer Does Not Kill conf.pl Properly

In file: /usr/share/webmin/virtual-server/scripts/squirrelmail.pl, the following code did not kill the SQM conf.pl configuration script properly, leading to extremely high CPU usage (over 40%) by the perl process running the script until it was killed manually.

        # Kill off conf.pl
        kill('KILL', $fpid);
        if (&foreign_check("proc")) {
                &foreign_require("proc", "proc-lib.pl");
                local ($cproc) = grep { $_->{'user'} eq $d->{'user'} &&
                                        $_->{'args'} =~ /conf\.pl/ }
                                      &proc::list_processes();
                if ($cproc) {
                        kill('KILL', $cproc->{'pid'});
                        }
                }
Status: 
Closed (fixed)

Comments

Looks like this doesn't handle the case where there are multiple conf.pl processes, such as the shell that executes conf.pl and conf.pl itself. I will fix Virtualmin to handle that case in the next release.

Automatically closed -- issue fixed for 2 weeks with no activity.