execvex(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

execvex(2)

execvex(2)                       System Calls                       execvex(2)



NAME
       execvex - execute a file

SYNOPSIS
       #include <sys/execx.h>

       int execvex(uintptr_t file, char *const argv[], char *const envp[],
           int flags);

DESCRIPTION
       All  of  the interfaces described in exec() are implemented using calls
       to the fundamental execvex() system call described  here.  See  exec(2)
       for  details  of  process  execution  and return values from the system
       call.


       The interpretation of the file argument depends on  the  value  of  the
       flags argument. The value of the flags argument must be an inclusive-OR
       of zero or more of these values:
         EXEC_DESCRIPTOR
         EXEC_RETAINNAME
         EXEC_ARGVNAME


       If EXEC_DESCRIPTOR is set in flags, the file argument must be  an  open
       file  descriptor  for  a regular file that is executable by the calling
       process. The file may have been opened with any of these  access  modes
       (see open(2)):
         O_RDONLY
         O_WRONLY
         O_RDWR
         O_EXEC


       If  EXEC_DESCRIPTOR  is  not  set in flags, the file argument must be a
       pointer to a pathname for a file that  is  executable  by  the  calling
       process.


       If  EXEC_RETAINNAME  is  set in flags, the process's name, contained in
       the  kernel  user   structure   u_comm[]   member,   fetched   in   the
       /proc/pid/psinfo  pr_fname[] member, reported by ps(1) and interrogated
       by pgrep(1), remains unchanged across the exec() of the new image.


       If EXEC_DESCRIPTOR or EXEC_ARGVNAME is set in flags and EXEC_RETAINNAME
       is  not set, the process's name becomes the last component of the path‐
       name-like argv[0] argument.


       If none of the EXEC_DESCRIPTOR, EXEC_RETAINNAME or EXEC_ARGVNAME  flags
       are set in flags, the name of the process becomes the last component of
       the pathname passed in the file argument.


       A call to execvex() with no flags:

         execvex((uintptr_t)pathname, argv, envp, 0);



       is equivalent to a call to execve():

         execve(pathname, argv, envp);



       A call to execvex() with only the EXEC_DESCRIPTOR flag:

         execvex(fd, argv, envp, EXEC_DESCRIPTOR);



       is equivalent to a call to fexecve():

         fexecve(fd, argv, envp);


RETURN VALUES
       If the execvex() function returns to  the  calling  process  image,  an
       error has occurred; the return value is -1 and errno is set to indicate
       the error.

ERRORS
       In addition to the failures described in exec(2), the  execvex()  func‐
       tion will fail if:

       EINVAL    The flags argument is invalid.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface  StabilityCommitted  _  MT-LevelAsync-Signal-
       Safe


SEE ALSO
       pgrep(1), ps(1), exec(2), open(2), proc(5), attributes(7)



Oracle Solaris 11.4               9 Nov 2010                        execvex(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3