MFS_SHARING_VIOLATION when opening in "a " mode after open in "r" mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MFS_SHARING_VIOLATION when opening in "a " mode after open in "r" mode

Jump to solution
618 Views
Fabi
Contributor III

When I open a file with "r" option, then closing it and opening it again with "a+" mode,

MQX runs in MFS_SHARING_VIOLATION in mfs_open.c:

            // If we are opening to write, the file can't already be opened.
            if ((access == MFS_ACCESS_WRITE_ONLY) || (access == MFS_ACCESS_READ_WRITE)) {
                error_code = MFS_SHARING_VIOLATION;
            }

What's wrong (with my calls)? Any ideas?

Tags (2)
0 Kudos
1 Solution
386 Views
Fabi
Contributor III

It was an application issue. In some circumstances, where was no "closing" between the two "openings".

View solution in original post

0 Kudos
2 Replies
386 Views
diego_augustus
Contributor II

Hi F.Bilz

Did you solve this problem?

Thanks.

0 Kudos
387 Views
Fabi
Contributor III

It was an application issue. In some circumstances, where was no "closing" between the two "openings".

0 Kudos