Re: how is "exec" executed by a shell?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mandeep Sandhu wrote:
But does'nt the shell "wait" for whatever command is given to it
to complete???....little confused here.

It does. Running "man" with no parameters causes a single line of text to be printed, and man exits immediately after. As the shell has been replaced by man, and man exits instantly, then you lose your shell.


$ exec exit
bash: exec: exit: not found

did not work! is'nt "exit" also a command?

$ type exit exit is a shell builtin

Daniel

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux