What Happens when you execute a command?

Answer Posted / amit

When command is given then unix os will fork the shell i.e
will creat a new process and will execute the command using
exec command...something like suppose you gave command "ls"
in the shell then...
fork();
exec(ls);
It will give you the result and after this the child process
will die.

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are two different models of ipc differentiate both?

779


What is the very first process created by kernel?

811


Which ipc is faster?

715


What are the various schemes available?

696


How to get or set an environment variable from a program?

721


Tell me set-user-id is related to (in unix)?

688


Explain what are the system calls used for process management?

695


Which ipc is the fastest in unix?

746


What is fork()?

787


Explain a zombie?

808


What is ipc in unix?

745


Please explain fork() system call?

726


Explain the initial process sequence while the system boots up?

708


How to write the program on full-duplex communication on bidirectional(e.g using two pipes)?

754


What is daemon?

731