Unix Man ( )


EXEC(3) - 3


execle (file, arg0, arg1, ..., argn, 0, environ); execve (file, argv, environ);

execlp execvp ac c e e apyea, o execl execv, o y aa, pocapa aao a e, a . Cco aaoo epec oao cpe.

exec aapo aepaec opaae ypaee cap opa poecca, ec oec xo oo ceyx yco:

[ENOENT] [ENOTDIR] [EACCES] [EACCES] [EACCES] [ENOEXEC] [ETXTBSY] [ENOMEM] [E2BIG] [EFAULT] [EFAULT]
Kooe e aa opaa poecca e cyecye.
Kooe peca e aa opaa poecca e ec aaoo.
o e papee a oc aaoe peca e aa opaa poecca.
a opaa poecca e ec o.
He papee a oee aa opaa poecca.
a opaa poecca ee papeee a oee, o eo opa e coaae c opao oeoo aa.
Ho a opaa poecca ec co poeypo (paee ceeo cpy), oop a oe op a ac py poecco.
Ho opa poecca peye a oe, e ey oe eeo oepao a oac coa.
co ao cce apye, epeaaex ooy opay, peae peycope cceo 512 ao.
a ooo aa opaa e coaae c yaao aooe.
Apec, aa path, argv envp, xo a pee ooaecoo apecoo pocpaca poecca.

BOPAAEOE AEE


B cyae yceoo aepe e pocxo opaa ypae ae cap opa poecca. ae ypaee opaaec cap opa, opaaec aee -1 errno aocc o o.

.


, fork(3), , semop(3)


exec oe aapo aepc, ec oe oepao a peae paep oac coa (c. e o o ENOMEM). Oao, o opaee caec cooae ceyx apao oa :

PRHUGEX PRNORMX
ooe o popay ae, ec ee paep peae paep oac coa. Tae popa o oeac ocyy ac oepao a e ooaec ID poecca oe pepoa. poecc, o popay aoo paepa, opyec cceo o py oac coa.
apeae poeccy o popay oooo paepa. o o oe cea o poecc.