On Tue, May 18, 2010 at 11:23 PM, Dr.Ruud
<rvtol+use...@isolution.nl<rvtol%2buse...@isolution.nl>
> wrote:

> pauldkl...@aol.com wrote:
>
>> I have a perl script that calls a compiled c program and retrieves the
>> output lines hundreds of times a minute, and want to make it as
>> efficient as possible.  This is on Windows XP and ActivePerl 5.8.
>>
>> Using 'system' and redirecting stdout to a file, then opening and
>> reading the file, I observed that McAfee was running hard, apparently
>> scanning the file for viruses.  So I put the scripts into a folder
>> tree that McAfee will ignore and the scanning stopped.
>>
>> Then I changed the Perl script to use backticks thinking that it would
>> be faster to just assign the output inside the script.  It works, but
>> now McAfee is running hard again and I don't see any speed
>> improvement.  Either Perl is forcing the lines to a path outside the
>> 'safe' one, or somehow McAfee is intercepting them between the two
>> programs.
>>
>> Any guidence or clarification would be appreciated.
>>
>
> Best change the operating system.
>
> --
> Ruud
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>
Hi Paul,

Dropping the operating system will not do the trick if your virus scanner is
still going crazy because of the script. Moving to an OS without virus
scanner is maybe not even an option depending on what the C file does and
what data it reads. So taking that of the table how to deal with this?

The most important thing is to figure out what it is that makes McAfee so
interested, most likely using the system command is considered a safe thing
as the script is run from within the excluded directory and thus all
commands executed by the script in this directory is safe.
But using back ticks basically opens a new shell and executes the C program
from that shell that shell will as far as McAfee is concerned not originate
inside the excluded directory and so the C program will be checked every
single time it is kicked of.

I would try, if possible, to exclude the C program from the scanners eager
eyes, that way no mater how you start it McAfee will ignore it, maybe simply
add the directory of the C program to the exception list...

If that is not an option then you might want to poke McAfee and ask them for
advise, I seriously doubt you are the only one that wants to have a process
exempt from the constant checking of their scanner.
I remember a few instances where a simple exclusion of a directory resulted
in a 20 times faster execution and a huge reduction in load on the system
simply because the over eager virus scanner would not leave an application
alone while it was operating normally.

Reply via email to