7 Dec 2010 02:55
virus scanner crashes jam
Craig Allsop <cjamallsop <at> gmail.com>
2010-12-07 01:55:30 GMT
2010-12-07 01:55:30 GMT
Hi jammers,
I recently got myself a new computer (an Intel i7/Win7 with much the
same software I had previously) and was disappointed to discover that
jam crashes quite often on it when I run my jam scripts. After having
a little trouble attaching to the crashed executable (since it didn't
do so when run within the debugger) I found it crashes in execunix.c
here:
/* Write command to bat file. */
f = fopen( cmdtab[ slot ].tempfile, "w" );
> fputs( string, f );
fclose( f );
string = cmdtab[ slot ].tempfile;
The problem is, it never opened the file for write, a bit weird since
it doesn't choose a slot unless pid is zero and that occurs after the
file is unlinked, right? Well after tracing file IO with sysinternals,
it turns out that the friendly virus scanner can get in the way, and
in this case it can hold a file handle to the tempfile which causes
windows to 'hold off' deleting it (reports as delete pending). Quite
annoying really given that I turned if off!
To make it more robust, I've changed my fopen to:
while ( (f = fopen( cmdtab[ slot ].tempfile, "w" )) == 0)
Sleep(5);
Now its rock solid again.
(Continue reading)
RSS Feed