delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/09/23:32:33

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Mon, 9 Jul 2001 23:32:05 -0400
MIME-Version: 1.0
Subject: __djgpp_spawn docs
Message-ID: <3B4A3EF5.14974.2AA2BA@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

Comments?

Index: dosexec.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/dos/process/dosexec.txh,v
retrieving revision 1.8
diff -c -p -r1.8 dosexec.txh
*** dosexec.txh	2001/07/09 00:38:09	1.8
--- dosexec.txh	2001/07/10 03:31:00
*************** spawnvpe(P_WAIT, "gcc", args, environ);
*** 139,144 ****
--- 139,198 ----
  
  @c -----------------------------------------------------------------------
  
+ @node __djgpp_spawn, process
+ @subheading Syntax
+ 
+ @example
+ #include <process.h>
+ 
+ int __djgpp_spawn(int mode, const char *path, char *const argv[],
+                   char *const envp[], unsigned long flags);
+ @end example
+ 
+ @subheading Description
+ 
+ This function runs other programs like @code{spawnve} (@pxref{spawn*}) except
+ that an additional parameter @var{flags} is passed.  @var{flags} can
+ include the following flags to control the details of finding the program
+ to run:
+ 
+ @table @code
+ 
+ @item SPAWN_EXTENSION_SRCH
+ 
+ Search for an extension the same way the @code{spawn*} functions do.
+ 
+ @item SPAWN_NO_EXTENSION_SRCH
+ 
+ Do not search for an extension.  If the file has an extension, it must already
+ be included in @code{path} or it won't be run.
+ 
+ @end table
+ 
+ @subheading Return Value
+ 
+ @xref{spawn*}
+ 
+ @subheading Portability
+ 
+ @portability !ansi, !posix
+ 
+ @subheading Example
+ 
+ @example
+ char *args[] = @{
+   "gcc",
+   "-v",
+   "hello.c",
+   0
+ @};
+ 
+ __djgpp_spawn(P_WAIT, "/dev/env/DJDIR/bin/gcc.exe", args, NULL,
+               SPAWN_NO_EXTENSION_SRCH);
+ @end example
+ 
+ @c -----------------------------------------------------------------------
+ 
  @node __dosexec_find_on_path, process
  @subheading Syntax
  

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019