fd = open(“1.txt”,O_CREAT|O_RDONLY);
fd1 = open(“2.txt”,O_CREAT|O_RDONLY);
pid_t p;
p = fork();
if (p == 0)
{
printf(“entering into child process\n”);
execl(“./test”,”test”,fd,fd1,NULL);
}
else
{
printf(“this is parent\n”);
}
return 0;
DOUBT:- the execl statement is not being executed….the program is getting terminated without its execution…can anyone help me wid this……
fd and fd1 are integers n u r trying to pass them as strings…
first convert them into strings and then try..