Re: execv() terminates a program

From: Anand Agrawal \(agrawala\) (agrawala_at_cisco.com)
Date: 06/27/03


Date: Fri, 27 Jun 2003 17:30:14 +0530

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.



Relevant Pages

  • Re: What is memory leakage
    ... >> When your program slowly consumes system memory. ... >> int main ... > Slightly off-topic, when a program terminates, all the memory it had ... allocation list and free'd everything after mainreturned or exit ...
    (comp.lang.c)
  • Re: What is memory leakage
    ... The standard doesn't guarantee that un-freed memory is reclaimed ... when the program terminates. ... The standard also doesn't guarantee that freed memory is reclaimed ... allocation within the program; it doesn't necessarily return it to the ...
    (comp.lang.c)
  • Re: 32-bit bitmap resources - pixel data
    ... >> until the program terminates? ... > UnlockResource/FreeResource are no longer necessary. ... The resource is ... > occupying real memory when needed. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Where does fatal() come from?
    ... > discarded a malloced pointer and had a memory leak. ... allocated memory should be ... returned to the system when the program terminates, ... the standard doesn't guarantee that malloced ...
    (comp.lang.c)
  • Re: What is memory leakage
    ... > When you allocate some memory block and never free it. ... It is quite possible for a correct program to allocate memory and never ... data that is relevant right up until the program terminates. ... reclaim unfreed memory but that's rare to non-existant these days. ...
    (comp.lang.c)