Hello,
I'm using a circular file (FIFO) where I store data continuously (3 times per second)
Around 4 or 5 hours after that I started my program
The function File = fopen (FichierHistoTest, "rb+"); returns the error "No such file or Directory ".
In fact all my write operations on my different files are blocked when this error occurs.
If I shut down the program than I restart
it it's working well again, my pointers were not lost and my program
continue to add new data after the last one before the error in each
file.
I've never seen that before and this part of program is working well on several application on another computers.
File = fopen (FichierHistoTest, "rb+");
if(File!=NULL){
fseek (File, (pointhistoTest*sizeof(HISTO)), SEEK_SET);
fwrite (&histo, sizeof(histo), 1, File);
fclose (File);
if( giFlagFileReadPb){
SetCtrlVal(handle, PANEL_LED_FILE,TRUE); //
Comment: This LED becomes red when the write operation fails
giFlagFileReadPb=FALSE;
}
pointhistoTest++;
if (pointhistoTest>=lMaxHisto) pointhistoTest=0;
File = fopen (FichierParaHistoTest, "w");
fprintf (File, "%lu\n", pointhistoTest);
fclose (File);
}
else {
if( !giFlagFileReadPb){
SetCtrlVal(handle, PANEL_LED_FILE,FALSE);
giFlagFileReadPb=TRUE;
}
pointhistoTest=pointhistoTestMem;
}
The path of the file is a relative path, I mean
that I use only the name of the file e:g: "EnregistrementsRealTime.bin"
=> FichierHistoTest ; "ParametresRealTime.txt" =>
FichierParaHistoTest
The computer a DELL Inspiron T3400 connected to Internet and to the LAN of the plant equipped wit Antivir.
Any Idea?
And how to reset my problem without reseting my program?
Thank You
D520