Unix Man ( )


EXEC(3)


EXEC(3)
XENIX System V (21 1987)


execl, execv, execle, execve, execlp, execvp - oee aa

int execl (path, arg0, arg1, ..., argn, (char*)0) char *path, *arg0, *arg1, ..., *argn;

int execv (path, argv) char *path, *argv[];

int execle (path, arg0, arg1, ..., argn, (char*)0, envp) char *path, *arg0, *arg1,..., *argn, *envp[];

int execve (path, argv, envp) char *path, *argv[], *envp[];

int execlp (file, arg0, arg1, ..., argn, (char*)0) char *file, *arg0, *arg1,..., *argn;

int execvp (file, argv) char *file, *argv[];


y ceeca exec ae ey opa poecca o opao. Ho opa eaec oeoo aa, aaeoo ao opaa poecca. oce yceoo oe oa exec eooe opa cap opa poecca, ocoy o epep o opao.

Apye path aae aa, coepaeo o opa poecca.

Apye file ae aae aa, coepaeo o opa poecca. Ec apye file e coep co /, pec e oo aa oyaec oceoaeo ocaoo e aaoo, yaax ae epeeo PATH (c. ). Koaa cpea oppyec eppeaopo oa (c. ).

Apye arg0, arg1, ..., argn c yaae a cpo coo, aepaee coo NUL. Cpo peca coo cco apyeo, epeaaex ooy opay poecca. Apye arg0 oe pcycoa cea oe yaa a cpoy, o coaay c path, o coepay oce ooe path.

Apye argv ec acco yaaee a coe cpo, aepaee coo NUL. Cpo peca coo cco apyeo, epeaaex ooy opay poecca. Apye argv[0] oe pcycoa cea oe yaa a cpoy, o coaay c path, o coepay oce ooe path.

Apye envp ec acco yaaee a coe cpo, aepaee coo NUL. Cpo peca coo oay cpey ooo opaa poecca. oce ee acca oe ye yaaee.

a, ope cap (a) opao poecca, ocac op oo opae a cee ex, y oopx a ap p exec pae 1; (c. fcntl(3)). aae o ex aax, o ocac op, e eec.

Ca, a oope capo opae poecca a ycaoea caapa pea (SIG_DFL) oppoae (SIG_IGN), ocac a e oo opae. Ha ca, oope capo opae oe epexaae, oo opae ycaaaec caapa pea cce (c. signal(3)).

Ec ycao ooaecoo ID y aa opaa poecca pae 1 (c. ), e ooaec ID poecca c o opao oaaec pa ooaecoy ID aa. Aaoo, ec ycao pyooo ID y aa opaa poecca pae 1, e pyoo ID poecca c o opao oaaec pa pyooy ID aa. Peae ooaec pyoo IDs poecca ocac ee.

popoae oce exec apeeo (c. ).

Ho opa poecca aceye o capoo opaa o pae epe, ceye apy: