This is probably a bad way to do it, but I just found the section in cgminer.c with the disabled message and changed it to exit.
if (unlikely(!hashes)) {
applog(LOG_ERR, "%s %d failure, disabling!", api->name, cgpu->device_id);
cgpu->deven = DEV_DISABLED;
cgpu->device_last_not_well = time(NULL);
cgpu->device_not_well_reason = REASON_THREAD_ZERO_HASH;
cgpu->thread_zero_hash_count++;
goto disabled;
}
Changed:
goto disabled;
To:
exit(1);
Then I start it with a .bat file:
:loop
C:\cgminer\cgminer.exe -S COM8 -S COM9
timeoutT 60
goto loop
Now if I pull the plug on the BFL Singles, it stops and waits for 60 seconds and then tries to restart again.