Professional Web Applications Themes

execv() terminates a program - UNIX Programming

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....

  1. #1

    Default 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.
    Evgeny Baskakov Guest

  2. #2

    Default Re: execv() terminates a program

    Evgeny Baskakov <jek_baskngs.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
    --
    _ _____ _____
    | ||_ _||_ _| [email]Jens.Toerringphysik.fu-berlin.de[/email]
    _ | | | | | |
    | |_| | | | | | [url]http://www.physik.fu-berlin.de/~toerring[/url]
    \___/ens|_|homs|_|oerring
    Jens.Toerring@physik.fu-berlin.de Guest

  3. #3

    Default Re: execv() terminates a program

    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_baskngs.ru> wrote in message
    news:6d6ae531.0306270328.3b1887cfposting.google.c om...
    > 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.

    Anand Agrawal \(agrawala\) Guest

Similar Threads

  1. Replies: 1
    Last Post: May 17th, 02:14 PM
  2. No in-program Help
    By Andy_Fielding@adobeforums.com in forum Adobe Indesign Windows
    Replies: 3
    Last Post: May 12th, 09:29 AM
  3. Different Program !
    By uncle Tom in forum Adobe Photoshop Elements
    Replies: 16
    Last Post: August 13th, 07:33 PM
  4. Script "terminates" when processing large numbers of files
    By Scott Stark in forum PERL Miscellaneous
    Replies: 1
    Last Post: August 3rd, 09:15 PM
  5. execv()
    By David Schwartz in forum UNIX Programming
    Replies: 2
    Last Post: July 9th, 08:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139