The problem is that you're doing write to stdio, which doesn't get
flushed before you exec(). Put an fflush(NULL); before execl() and
you're fine.
> 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");
>
> }
-hpa
-- "The user's computer downloads the ActiveX code and simulates a 'Blue Screen' crash, a generally benign event most users are familiar with and that would not necessarily arouse suspicions." -- Security exploit description on http://www.zks.net/p3/how.aspb- 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/