Hi all,
I have the following code which hangs in fread() when one of my disks goes "bad" or is pulled from system unplanned (I need to support this case)
Code:mbr = fopen(fullpath, "r");
if (!mbr) {
fprintf(stderr, "ERROR: Can't open device %s
\n",
fullpath);
return 0;
}
count = fread(buffer, 1, 512, mbr);
if (count < 512) {
return and print error
}
any ideas why/when fread() would just never return??