This very simple example of exec() system call. Here, I am trying to call execlp() twice. But, I am not getting excepted output. It shows output only f
exec()
execlp()
#include #include int main() { int ret1,ret2; pid_t chd; chd=fork(); if(chd==0) ret1 = execlp( "pwd", "pwd", (char *) 0); else if(chd>0) ret2 = execlp( "date", "date", (char *) 0); return 0; }