Executing A Program Within A Program

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
deus_the_programmer

Executing A Program Within A Program

Post by deus_the_programmer »

hi can someone supply me with some unix c  code to execue a program called: menu

many thanks,

ed.
GT

RE:Executing A Program Within A Program

Post by GT »

execlp("menu", "menu", 0);
Gnome

RE:Executing A Program Within A Program

Post by Gnome »

One of the exec*() family of functions will do the trick together with a fork().

You can also check out the system() function, which is really a wrapped up (or "stripped down", depending on your disposition) version of the exec*()/fork() combination.

Gnome.
Post Reply