On 10/19/06, Topher Fischer <[EMAIL PROTECTED]> wrote:
Dr. Mercer's Computer Architecture (CS345) class gave me my only
experience with a practical use of forking.  We wrote a small UNIX
shell, and when the user typed in a command, the program would fork.
This creates a new process with its own memory space, file descriptor
table, signal handlers, etc.  The child process would then exec (man 3
exec) the user's command, which takes over the process that was created
by the fork command.  If concurrency is the only goal, then threads will
usually take care of the problem.  However, if you need a completely new
process with its own resources, then fork you.  I mean, then you fork.

So when the child process finishes with whatever command the user
entered does it then have a mechanism for killing itself off to avoid
a slower version of a fork bomb?

--
Alex Esplin

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to