SYNOPSIS
#include <nutc.h>
extern char **environ;
int _NutForkExecl(const char *path, const char *arg0, ..., const char *argn, (char *)0);
int _NutForkExecle(const char *path, const char *arg0, ..., const char *argn, (char *)0, char *const envp[]);
int _NutForkExeclp(const char *file, const char *arg0, ..., const char *argn, (char *)0);
int _NutForkExeclpe(const char *file, const char *arg0, ..., const char *argn, (char *)0, char *const envp[]);
int _NutForkExecv(const char *path, char *const argv[]);
int _NutForkExecve(const char *path, char *const argv[], char *const envp[]);
int _NutForkExecvp(const char *file, char *const argv[]);
int _NutForkExecvpe(const char *file, char *const argv[], char *const envp[]);
DESCRIPTION
The
Handlers registered with
PARAMETERS
- path
-
Specifies the path name of the new process image file.
- file
-
Is used to construct a path name that identifies the new process image file. If file contains a slash character, the argument is used as the path name for this file; otherwise, the path prefix for this file is obtained by a search of the directories in the environment variable PATH. If PATH is not set, the current directory is searched.
- arg0, ..., argn
-
Are pointers to null-terminated character strings. These strings constitute the argument list for the new process image. The list is terminated by a NULL pointer. The argument arg0 should point to a file name that is associated with the process being started by the
_NutForkExec() function. - argv
-
Contains the argument list for the new process image. This is an array of pointers to character strings and should be terminated by a NULL pointer. The value in argv[0] should point to a file name that is associated with the process being started by the
_NutForkExec() function. - envp
-
Contains the environment for the new process image. This is an array of pointers to character strings and should be terminated by a NULL pointer.
RETURN VALUES
If successful, the
- E2BIG
-
The number of bytes used by the new process image's argument list and environment list is greater than ARG_MAX bytes.
- EACCES
-
Search permission is denied for a directory listed in the new process image file's path prefix, or the new process image file denies execution permission, or the new process image file is not a regular file.
- ENAMETOOLONG
-
The length of path or file (or an element of $PATH prefixed to file) exceeds PATH_MAX, or a path name component is longer than NAME_MAX.
- ENOENT
-
A component of path or file does not name an existing file, or path or file is an empty string.
- ENOEXEC
-
The new process image file has the appropriate access permissions, but is not in the proper format.
- ENOMEM
-
The new process image requires more memory than is allowed by the hardware or system-imposed memory management constraints.
- ENOTDIR
-
A component of the new process image file's path prefix is not a directory.
CONFORMANCE
PTC MKS Toolkit UNIX APIs extensions.
MULTITHREAD SAFETY LEVEL
Except for
PORTING ISSUES
The
You must ensure that any path name arguments you pass to non-NuTCRACKER Platform applications are in Win32 format, as only NuTCRACKER Platform applications recognize the NuTCRACKER Platform format. Refer to Path Names in the Windows Concepts chapter of the PTC MKS Toolkit UNIX to Windows Porting Guide for more information.
Executable paths are treated as multibyte sequences and are converted to Unicode (UTF-16)
before passing to Win32. The conversion is either performed based on the
current thread locale, set using
Environment variables are sonsidered to be multibyte sequences and converted to Unicode (UTF-16)
only when
The argument arrays are sonsidered to be multibyte sequences and converted to Unicode (UTF-16)
only when
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutQueryPid() ,alarm() ,atexit() ,chmod() ,execl() ,execle() ,execlp() ,execlpe() ,execv() ,execve() ,execvp() ,execvpe() ,exit() ,fcntl() ,fork() ,getenv() ,getitimer() ,getpid() ,mmap() ,pthread_atfork() ,pthread_create() ,putenv() ,semop() ,setlocale() ,shmat() ,sigaction() ,sigpending() ,sigprocmask() ,times() ,umask() ,vfork() ,xlocale()
PTC MKS Toolkit 10.5 Documentation Build 40.