Fork and Execl

don at umd5.UUCP don at umd5.UUCP
Wed Feb 19 05:08:58 AEST 1986


I've got a question ... Our library here is a bit shy on good Unix books,
(people take them out and then never return them) and the online and
Programmer's manuals haven't been able to answer my question clearly ...
The question is:

After issuing the fork(), I know the parent process gets the pid of the
child, and the child is a copy of the parent process, but where does the
execution of the child process continue from ? (assuming the child process
was created with no errors) In other words, if I wanted to put an execl()
in the child to overwrite the child, where would it go ? Additionally, how
can I be certain that I won't ever overwrite the parent process ?
Without code fragments, I've not been able to get a clear picture of how
this works.

AtDhVaAnNkCsE
-- 
--==---==---==--
".. all mimsy were the Borogroves .."

  ARPA: don at umd5.UMD.EDU
BITNET: don%umd5 at umd2
  UUCP: ..!{ seismo!umcp-cs, ihnp4!rlgvax }!cvl!umd5!don

(NOTE: Please mail to  umcp-cs!cvl!umd5!don  NOT  umd5!cvl!umcp-cs!don)
umcp-cs ::= mimsy.UMD.EDU | maryland.ARPA | umcp-cs.UUCP



More information about the Comp.lang.c mailing list