I have a C program that writes data to a file.
Program C does not keep the file open at run time, it simply opens the file with fopen ("myfile.txt","a")) and writes some data, and then closes the file.
On the other hand, I have a script file that can simultaneously perform 2 actions in a single file using a binary C program:
Is there a risk of the state of the betwen script race and the C binary program? Can Linux ioctl handle this problem?
If there is a risk of race conditions, how to check in C and shell before processing the file?