delorie.com/djgpp/doc/libc/libc_294.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

exec*

Syntax

 
#include <unistd.h>

int execl(const char *path, const char *argv0, ...);
int execle(const char *path, const char *argv0, ...
           /*, char *const envp[] */);
int execlp(const char *path, const char *argv0, ...);
int execlpe(const char *path, const char *argv0, ...
            /*, char *const envp[] */);

int execv(const char *path, char *const argv[]);
int execve(const char *path, char *const argv[], char *const envp[]);
int execvp(const char *path, char *const argv[]);
int execvpe(const char *path, char *const argv[], char *const envp[]);

Description

These functions operate by calling spawn* with a type of P_OVERLAY. Refer to spawn* (see section spawn*) for a full description.

Return Value

If successful, these functions do not return. If there is an error, these functions return -1 and set errno to indicate the error.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

 
execlp("gcc", "gcc", "-v", "hello.c", 0);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004