Re: Write to executable which has done execve



On Wed, 15 Aug 2007 06:31:39 -0700 Bronson <pshemu@xxxxxxxxx> wrote:
On 14 Sie, 02:25, Frank Cusack <fcus...@xxxxxxxxxxx> wrote:
On Mon, 13 Aug 2007 16:18:03 -0700 Bronson <psh...@xxxxxxxxx> wrote:

Now i've got it.... Sorry for all that, it was my stupid mistake...
I did execve from another thread, not the main thread...
That is why shell was quiting and probably setpriority crashing... ;-)

I don't see how that matters. All threads are, by definition, equivalent.
There isn't really such a thing as a "main thread".

-frank

I do know exactly, but "main" i call the one, which is executed when
the program executes (for example when you do not create any thread,
the main is running). I don't know - maybe it is called process
then...
I was just curious, why shell quits when i make execv. Now i know - i
call it not from the thread, which shell is executing, and that is why
it quits (in man of execve it is written, that all other threads are
closed exept one, which executes execve). I think you now get my
point.

I think I get it. Makes sense.
-frank
.