1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

System calls

Discussion in 'C' started by vyshnavi, Jun 5, 2007.

  1. vyshnavi

    vyshnavi New Member

    Joined:
    Jun 5, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I am working on visual c++ 6.0.I have to compile and execute a program using system calls.(system command).Main program is compiling a program file using tcc system command.
    The program is compiling without any errors or warnings but in my output window command prompt is appearing stopping the further execution.

    help me?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Would you mind sharing the code which you think is aborting abnormally?
     
  3. vyshnavi

    vyshnavi New Member

    Joined:
    Jun 5, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Thanks 4r replying.
    Actually I am working on the code which has to transfer files 4m one system to another.In main program i created a thread to accept that program file and then compile&run using TCC command.then i have to send the result file back to the system which sent that program file.

    Everything is wrking is fine but after compiling program file it is just coming out of the main thread.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    In TCC I am not sure how you are doing a thread. If you have the thread you should wait for the thread to end before you proceed to end in main.
     
  5. vyshnavi

    vyshnavi New Member

    Joined:
    Jun 5, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    ya ur right,but the thread in which we r compiling is killing not only that thread but also the main thread also.
    here after compiling it is returning to the command prompt.(no further execution)
     
  6. vyshnavi

    vyshnavi New Member

    Joined:
    Jun 5, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Can anyone help me?
    I am working on visual c++6.0.(windows socket programming).I have 2 transfer the files from one system to another.I am using threads for this(CreateThread()).
    The problem is i am not able to transfer all files,only some files are transferred.also different files are transferred each time i run.(file 1, 2,6 first time i run and files 2 4 7 transferred next time i run)
    If i am using debugging mode i.e using f10 all files are transferred.

    What is the problem?
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    The problem looks like is with the timing.
     
  8. vyshnavi

    vyshnavi New Member

    Joined:
    Jun 5, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    I forgot to mention one thing ,actually i'm passing the structure to the thread that trnsfers the file. this structure contains the information about the file.only some part of the structure is received by the thread,but other information is vanishing.I donot know how?
     
  9. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Read Shabbir's post #2. You're looking at the code and you can't figure it out, but you want someone else to do it in the dark?
     

Share This Page