ETXTBSY may only be returned if you're trying to run a program that's being written to, or write to a program that's currently running. If two programs open a data file for exclusive writing, one of them should get EACCES. Is this still the case after your patch is applied?