#include /* exec, getcwd */ #include /* printf */ /* Exec example code */ /* This program simply execs "/bin/ls" */ void main(void) { char buf[1000]; printf("Here are the files in %s:\n", getcwd(buf,1000)); execl("/bin/ls","ls","-al",NULL); printf("If exec works, this line won't be printed\n"); }