Messages in this thread | | | Date | Wed, 24 Mar 1999 09:51:48 +0530 (IST) | From | G Jalaja Devi <> | Subject | execl! |
| |
Have a look at this piece of code. The instructions prior to the execl() function is not getting executed. When I give a getchar() after the printf statement then the "Tr -module" is getting printed. From the manpage, what I had understood is that the execl function replaces the current process image with the new process image. But, Does it replaces the prior instructions also? or what is happening??
int pid; pid = fork(); if (pid == 0) { printf("Tr -module"); getchar(); execl("/sbin/insmod", "insmod", "trc", NULL); } else if (pid < 0) perror("Error in fork - load2.c"); else { printf("I am in the parent process"); }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |