AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
·� '·-
EXEC (2) EXEC (2) NAME execl, execv, execle, execve, execlp, execvp - execute a file SYNOPSIS int execl (path, argO, argl, ••• , argo, 0) char •path, •argO, •argl, ••• , •argo; int execv (path, argv) char *path, •argv[ ]; int execle (path, argO, argl, ••• , argo, 0, envp) char •path, •argO, •argl, ••• , •argo, •envp[ ]; int execve (path, argv, envp) char •path, •argv[ ], •envp[ ]; int execlp (file, argO, argl, ••• , argo, 0) char •file, •argO, •argl, ••• , •argo; int execvp (file, argv) char •file, •argv[ ]; DESCRIPTION Exec in all its forms transforms the calling process into a new process. The new process is constructed from an ordinary, executable file called the new process file . This file consists of a header (see a. out( 4)), a text segment, and a data segment. The data segment contains an initialized portion and an uninitialized portion (bss). There can be no return from a successful exec because the calling process is overlaid by the new process. When a C program is executed, it is called as follows: main (argc, argv, envp) int argc; char ••argv, ••envp; where argc is the argument count and argv is an array of character pointers to the arguments themselves. As indicated, argc is conventionally at least one and the first member of the array points to a string containing the name of the file. Path points to a path name that identifies the new process file. File points to the new process file. The path prefix for this file is obtained by a search of the directories passed as the environment line "PATH =" (see environ(5)). The environment is supplied by the shell (see sh(l)). ArgO, arg1 , ... , argn are pointers to null-terminated character strings. These strings constitute the argument list available to the new process. By convention, at least argO must be present and point to a string that is the same as path (or its last component). Argv is an array of character pointers to null-terminated strings. These strings constitute the argument list available to the new process. By convention, argv must have at least one member, and it must point to a string that is the same as path (or its last component). Argv is terminated by a null pointer. - 1-
- Page 628 and 629: VI (l) VI ( 1) mapped to I, then if
- Page 630 and 631: VI (l) VI (l) won't be broken. Inse
- Page 632 and 633: � I . .... .,_ J _ . . ·
- Page 634 and 635: .. \ '-�� -·
- Page 637 and 638: WIIO (I) WHO(l) NAME who - who is o
- Page 639: WRITE ( l ) WRITE ( l ) NAME write
- Page 642 and 643: XARGS(l) XARGS (l) -nnumber Execute
- Page 645 and 646: YACC { I ) YACC { l ) NAME yacc - y
- Page 647 and 648: INTRO ( 2) INTR0 ( 2 ) NAME intro -
- Page 649 and 650: INTRO ( 2) INTR0 (2) 21 EISDffi Is
- Page 651 and 652: INTRO (2) INTRO ( 2) ProcO is the s
- Page 653 and 654: INTR0 (2) INTR0 (2) permission requ
- Page 655 and 656: INTR0 (2) time_t shm_dtime; time_t
- Page 657: ACCESS (2} ACCESS (2} NAME access -
- Page 661 and 662: ALARM (2) ALARM (2) NAME alarm - se
- Page 663: BRK(2) BRK ( 2 ) NAME brk, sbrk - c
- Page 667 and 668: CHMOD (2) CHMOD (2) NAME chmod - ch
- Page 669: CHOWN(2) CHOWN(2) NAME chown - chan
- Page 673 and 674: CLOSE ( 2) CLOSE (2) NAME close - c
- Page 675 and 676: CREAT ( 2 ) CREAT ( 2 ) NAME creat
- Page 677: DUP (2) DUP (2) NAME dup - duplicat
- Page 681: EXEC (2) EXEC (2) Search perm1ss10n
- Page 684 and 685: EXIT (2) EXIT (2) WARNING See WARNI
- Page 686 and 687: FCNTL (2) FCNTL (2) immediately wit
- Page 689 and 690: FORK(2) FORK(2) NAME fork - create
- Page 691: GETPID ( 2} GETPID (2) NAME getpid,
- Page 694 and 695: I I I I I I I I I I I I I I I I I I
- Page 696 and 697: �-
- Page 699: LINK ( 2 ) LINK ( 2 ) NAME link - l
- Page 703 and 704: MKNOD (2) MKNOD (2) NAME mknod - ma
- Page 705: MOUNT (2) MOUNT (2) NAME mount - mo
- Page 708 and 709: MSGCTL(2) MSGCTL ( 2 ) user ID of t
- Page 710 and 711: MSGGET (2) MSGGET (2) SEE ALSO msgc
- Page 712 and 713: MSGOP ( 2) MSGOP (2) the calling pr
- Page 714 and 715: If)
- Page 717 and 718: OPEN ( 2 ) OPEN ( 2 ) NAME open - o
- Page 719: OPEN(2) OPEN(2) O_NDELAY is set, th
- Page 722 and 723: I�
- Page 725 and 726: PLOCK(2) PLOCK(2) NAME plock - lock
- Page 727: PROFIL ( 2 ) PROFIL ( 2 ) NAME prof
EXEC (2) EXEC (2)<br />
NAME execl, execv, execle, execve, execlp, execvp - execute a file<br />
SYNOPSIS<br />
int execl (path, argO, argl, ••• , argo, 0)<br />
char •path, •argO, •argl, ••• , •argo;<br />
int execv (path, argv)<br />
char *path, •argv[ ];<br />
int execle (path, argO, argl, ••• , argo, 0, envp)<br />
char •path, •argO, •argl, ••• , •argo, •envp[ ];<br />
int execve (path, argv, envp)<br />
char •path, •argv[ ], •envp[ ];<br />
int execlp (file, argO, argl, ••• , argo, 0)<br />
char •file, •argO, •argl, ••• , •argo;<br />
int execvp (file, argv)<br />
char •file, •argv[ ];<br />
DESCRIPTION<br />
Exec in all its forms transforms the calling process into a new process.<br />
The new process is constructed from an ordinary, executable<br />
file called the new process file . This file consists of a header (see<br />
a. out( 4)), a text segment, and a data segment. The data segment<br />
contains an initialized portion and an uninitialized portion (bss).<br />
There can be no return from a successful exec because the calling<br />
process is overlaid by the new process.<br />
When a C program is executed, it is called as follows:<br />
main (argc, argv, envp)<br />
int argc;<br />
char ••argv, ••envp;<br />
where argc is the argument count and argv is an array of character<br />
pointers to the arguments themselves. As indicated, argc is<br />
conventionally at least one and the first member of the array<br />
points to a string containing the name of the file.<br />
Path points to a path name that identifies the new process file.<br />
File points to the new process file. The path prefix for this file is<br />
obtained by a search of the directories passed as the environment<br />
line "PATH =" (see environ(5)). The environment is supplied by<br />
the shell (see sh(l)).<br />
ArgO, arg1 , ... , argn are pointers to null-terminated character<br />
strings. These strings constitute the argument list available to the<br />
new process. By convention, at least argO must be present and<br />
point to a string that is the same as path (or its last component).<br />
Argv is an array of character pointers to null-terminated strings.<br />
These strings constitute the argument list available to the new<br />
process. By convention, argv must have at least one member, and<br />
it must point to a string that is the same as path (or its last component).<br />
Argv is terminated by a null pointer.<br />
- 1-