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

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

 



Tobias Klauser wrote:
On 01/07/2005 10:15 AM, Mandeep Sandhu wrote:

$ exec man

The shell closed!

$ exec man &
[1] 10618
$ What manual page do you want?

[1]+  Exit 1                  exec man
$

The man page of exec says....
"If  command is specified, it replaces the shell."


Yes, that's exactly what "exec man" did, replace the shell with man. man can't live without a shell, thus it exited.

Eh? ``man'' just did what it was requested to do, i.e. nothing, and *then* exited. It's in a no way related to shell.


--
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