1 /**[txh]********************************************************************
3 Module: Spawn replacement for UNIXes
5 This module provides spawnv and spawnvp functions for UNIX.@*
6 Copyright 1999 by Salvador E. Tropea. You can use it under the terms of
7 the GPL license. e-mail: salvador@inti.gov.ar, set@computer.org
11 ***************************************************************************/
20 /**[txh]********************************************************************
23 That's a replacement for the DOS spawnv function which was POSIX during
24 the drafts but then was removed. It avoids the need of the fork/exec/wait
25 sequence which doesn't work for djgpp.
27 ***************************************************************************/
29 int spawnv(int mode, const char *path, char *const argv[])
34 return execv(path,argv);
45 /**[txh]********************************************************************
48 Same as spawnv but using execvp. @x{spawnv}.
50 ***************************************************************************/
52 int spawnvp(int mode, const char *path, char *const argv[])
57 return execv(path,argv);
60 if (execvp(path,argv))