After starting some elf file that is on ext4 filesystem it is locked for writing but can be removed and rewritten. On some other filesystem this behaiveour can be different - i have tested virtualboxfs and there also I can not remove running executable file.
I am truing to implmenent some continuous integration scenario with self restarting and self compiling module. Thats why I need a possibility to unlock and overwrite somehow my running binary. For ext4 I can remove and then recompile file to the old place but I don't like this scenario, because inode with old file will be still blocked. Is there exists some other possibility to implement "transparent" recompilation and restart ?