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

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

__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

ANSI/ISO C No
POSIX No

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);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004