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 ***************************************************************************/
19 /**[txh]********************************************************************
22 That's a replacement for the DOS spawnv function which was POSIX during
23 the drafts but then was removed. It avoids the need of the fork/exec/wait
24 sequence which doesn't work for djgpp.
26 ***************************************************************************/
28 int spawnv(int mode, const char *path, char *const argv[])
33 return execv(path,argv);
44 /**[txh]********************************************************************
47 Same as spawnv but using execvp. @x{spawnv}.
49 ***************************************************************************/
51 int spawnvp(int mode, const char *path, char *const argv[])
56 return execv(path,argv);
59 if (execvp(path,argv))