Closed JaeseungYeom closed 1 year ago
@JaeseungYeom I've tweaked your is_wronly
function to check for fcntl
errors (as @garlick recommended). I've tested this with my DYAD demo for the ECP tutorial, and it works. Can you take a look to make sure it looks good before merge?
DYAD currently detects the synchronization need by environment variable. Users need to set appropriate variable to tell DYAD I/O interceptor which file access to synchronize. However, this has a limitation as a process can open multiple files with different modes. A consumer can be a producer at the same time, and vice versa. This PR removes the need for environment variable. For a file about to be closed, it utilizes the system call
fcntl()
to detect if a file has been open in the write mode. For a file about to be opened, the mode argument can be checked easily. This addresses issue #10