Showing posts with label execlp. Show all posts
Showing posts with label execlp. Show all posts

Friday, November 23, 2012

fork and exec method use together to execute Shell Commands | Operating System

A parent process should create a child process which will execute command "ls -l" using execlp() and will create its child process. The newly created child process should execute system call command "cat hello.txt" and create a child process. The newly created process should execute system call"whoami" and then terminate. Every parent process should wait for terminating its child process.

fork and exec method use together to execute Shell Commands | Operating System