I have two programs, one of them calls another through execl, but it doesn't start.
Here is the calling program:
#include <stdio.h>
#include <unistd.h>
int main(int argc, int *argv[])
{
printf("Program %s executes", argv[0]);
execl("hello", " ", "Hello", "World!", NULL);
return 0;
}
The "hello" program:
#include <stdio.h>
int main(int argc, char *argv[])
{
int i=1;
printf("%s\n",argv[0]);
printf("Program started and got string : ");
while(argv[i++] != NULL)
printf("%s ",argv[i]);
return 0;
}