[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: calling external programs



system() is fine for simple things. If you are looking for more
sophisticated interaction of the two programs, you might want
to read about fork() and wait().

    Using fork(), exec..(), wait(), pipe(), open(), close(), dup(), signal()
and sigaction() you can build pretty sophisticated communication
mechanisms between mother and daughter processes. Good reading
in this case, this is all about basic Unix functionalities.

    Didier

Dr. Nikolaus Klepp a écrit :
ever tried system() ?
n.

Am Samstag, 25. November 2006 02:29 schrieb Junior:
  
Hi All,
This might be a silly question but since I don't know it I guess I'll ask.

I looking for a method to execute a command from within a C program and
wait for it to terminate. The exec methods, from what I've read doesn't
wait for program termination. One of the commands I'm trying to use is tar
and there is no tar system calls as far as I know, and would like to wait
for its termination. Could someone share how is this done?

Much thanks,
--Jr.
    

  


Reply to: