Re: Write to executable which has done execve
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Sat, 11 Aug 2007 17:36:27 -0700
On Aug 11, 5:30 pm, Bronson <psh...@xxxxxxxxx> wrote:
i am trying to make a program, which will exec another app and this
app will write to the main's program executable. I make execve
(precisely execlp) and try to open old file for writing in new
process. But I returns me ETXTBSY. Why? For example access says, that
i can write to file, but fopen fails with ETXTBSY...
What can i do with that...
You can't do it that way. You cannot modify a program's running image
by modifying the executable file. If you could, self-modifying code
would not work properly.
DS
.
- Follow-Ups:
- Re: Write to executable which has done execve
- From: Pascal Bourguignon
- Re: Write to executable which has done execve
- References:
- Write to executable which has done execve
- From: Bronson
- Write to executable which has done execve
- Prev by Date: Write to executable which has done execve
- Next by Date: Re: Write to executable which has done execve
- Previous by thread: Write to executable which has done execve
- Next by thread: Re: Write to executable which has done execve
- Index(es):
Relevant Pages
|