Back in DOS, Borland C/C++ you had O_DENYxxx flags available on open(). On MS Visual Studio / Windows you have sopen(), some flavors of open() have O_SHARE_xxxx flags available (ibm docs for example). But I can't seem to find what Linux has available that works similarly?