Go to the first, previous, next, last section, table of contents.


__djgpp_spawn

Syntax

#include <process.h>

int __djgpp_spawn(int mode, const char *path, char *const argv[],
                  char *const envp[], unsigned long flags);

Description

This function runs other programs like spawnve (see section spawn*) except that an additional parameter flags is passed. flags can include the following flags to control the details of finding the program to run:

SPAWN_EXTENSION_SRCH
If an extension is not included in path, search for a file path with the extensions `.com', `.exe', `.bat', and `.btm'.
SPAWN_NO_EXTENSION_SRCH
Do not perform an extension search. If the file has an extension, it must already be included in path.

Return Value

See section spawn*.

Portability

not ANSI, not POSIX

Example

char *args[] = {
  "gcc.exe",
  "-v",
  "hello.c",
  0
};

__djgpp_spawn(P_WAIT, "/dev/env/DJDIR/bin/gcc.exe", args, NULL,
              SPAWN_NO_EXTENSION_SRCH);


Go to the first, previous, next, last section, table of contents.