Mike Frysinger wrote:
pretty sure the linux kernel (and others?) would return ETXTBSY and not even allow the write
---- I think that's a relatively new innovation -- i.e. since the ability to setup read-only code segments was implemented, though FWIW, you are right. I think it's a text editor thing -- for Example, on windows, I can't write to a running bash-script (says it is read-only for the duration of execution. Though I can on linux. I suppose if bash were to mmap the script file and mark it as "executable", it would get the same read-only protection as binaries..??