f



execv() terminates a program

I have a program that uses threads (Linux, pthread 0.10).
One thread asks to another one, called "Forker", to execute an
application, given by a filename. The Forker thread calls fork()
function and then the child process calls execv() function.

Regardless of expectation, the application not starts, and my
program immediately terminates with 0 exitcode.

I not understand a thing. Someone can explain me this strange
bahavior?

Excuse my English, please.

I will be very grateful for any help.
0
jek_bask
6/27/2003 11:28:25 AM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

2 Replies
858 Views

Similar Articles

[PageSpeed] 49

Evgeny Baskakov <jek_bask@ngs.ru> wrote:
> I have a program that uses threads (Linux, pthread 0.10).
> One thread asks to another one, called "Forker", to execute an
> application, given by a filename. The Forker thread calls fork()
> function and then the child process calls execv() function.

> Regardless of expectation, the application not starts, and my
> program immediately terminates with 0 exitcode.

Which program? The child process?

> I not understand a thing. Someone can explain me this strange
> bahavior?

Unless you post the code you use with the execv() call that's
hardly going to be possible. First guess is you're making some
mistakes there, but without seeing what you do it's impossible
to tell.
                                    Regards, Jens
-- 
      _  _____  _____
     | ||_   _||_   _|        Jens.Toerring@physik.fu-berlin.de
  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring
0
Jens
6/27/2003 11:38:18 AM
i guess due to some error in code the memory is getting overwritten and
hence program terminates.

as told, it will be good if you can paste part of the code.

"Evgeny Baskakov" <jek_bask@ngs.ru> wrote in message
news:6d6ae531.0306270328.3b1887cf@posting.google.com...
> I have a program that uses threads (Linux, pthread 0.10).
> One thread asks to another one, called "Forker", to execute an
> application, given by a filename. The Forker thread calls fork()
> function and then the child process calls execv() function.
>
> Regardless of expectation, the application not starts, and my
> program immediately terminates with 0 exitcode.
>
> I not understand a thing. Someone can explain me this strange
> bahavior?
>
> Excuse my English, please.
>
> I will be very grateful for any help.


0
Anand
6/27/2003 12:00:14 PM
Reply: