Hi mates,
Is there any difference between execvp and execlp? any comment will be appreciated.
abdul:)
Hi mates,
Is there any difference between execvp and execlp? any comment will be appreciated.
abdul:)
With execvp you need an argv array already built. So a program like:
#include "stdlib.h" /** vb is eating my angle brackets **/
main(argc,argv)
int argc;
char **argv;
{
execvp(*++argv, argv);
}
will simply pass its arguments to execvp.
With execlp you do stuff like:
execlp("echo", "echo", "one", "two", NULL);