How can I modify the application file of an application that is currently running (on Linux)?
Posted
by Hach-Que
on Stack Overflow
See other posts from Stack Overflow
or by Hach-Que
Published on 2010-06-07T06:37:08Z
Indexed on
2010/06/07
6:42 UTC
Read the original article
Hit count: 150
I have an application running called AppFS. This application has an ext2 filesystem just attached to the end of the file (it's positioned so that the application binary exists in a 1MB spacing area, followed by the ext2 data).
Now I've got FUSE embedded in the program and I've managed to extract the filesystem out of the application data into a temporary file so that FUSE can mount / use it.
The problem I have now is writing the temporary file back into the application file. I get "Text file busy" presumably because the application has locked itself and won't let writes occur.
Is there a way I can force the file to become unlocked so I can write data to it? (It's important to note that I'm not changing the application binary area - just rewriting the ext2 component.) It needs to be unlocked without requiring root permissions (unlocked by the same user who started the application).
© Stack Overflow or respective owner