Major league corruption - anyone seen anything like this?

Skip Montanaro skip at pobox.com
Wed Feb 13 15:45:11 CET 2002


    Dave> Use strace to track system calls.

Thanks to Dave's suggestion I found the culprit.  I was using an unsigned
int as a for loop counter that counted down to zero:

    unsigned int i;
    ...
    for (i=nchunks; i>=0; i--) {
        ...
    }

This is (of course) an infinite loop.  The strace output showed 28,000+
calls to unlink.  Obviously I was forgetting to check its return value as
well. :-(

Thanks for all the help...

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list