Re: execv() terminates a program

Jens.Toerring_at_physik.fu-berlin.de
Date: 06/27/03


Date: 27 Jun 2003 11:38:18 GMT

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


Relevant Pages

  • Re: Problem with fork inside a thread and system()
    ... In my program I need to launch the "pppd" from a thread, so, I create ... a new process withforkand then in the child process I launch with ... father stuff..... ... Ok I Have tryed with execv: ...
    (comp.os.linux.development.apps)
  • pthread - fork - execv problem
    ... fork and execv to start a child programme in this case an mp3 player. ... However, under FreeBSD-5.2.1, the execv causes all the threads in the parent ... process to be blocked until the child process returns. ...
    (freebsd-current)
  • Re: Problem with fork inside a thread and system()
    ... I call execv from a child process created from a thread the pppd ... script fails!!!! ... On the other hand when I call execv from a process created from a fork ... Please read the FAQ on how to ask smart questions. ...
    (comp.programming.threads)
  • Re: Problem with fork inside a thread and system()
    ... In my program I need to launch the "pppd" from a thread, so, I create ... a new process withforkand then in the child process I launch with ... father stuff..... ... Ok I Have tryed with execv: ...
    (comp.os.linux.development.apps)
  • Re: Problem with fork inside a thread and system()
    ... In my program I need to launch the "pppd" from a thread, so, I create ... a new process withforkand then in the child process I launch with ... father stuff..... ... Ok I Have tryed with execv: ...
    (comp.os.linux.development.apps)