[GRASS-SVN] r40904 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 9 23:18:26 EST 2010


Author: glynn
Date: 2010-02-09 23:18:26 -0500 (Tue, 09 Feb 2010)
New Revision: 40904

Modified:
   grass/trunk/lib/gis/popen.c
Log:
G_spawn_ex() expects descriptors as "int"s, not "char*".


Modified: grass/trunk/lib/gis/popen.c
===================================================================
--- grass/trunk/lib/gis/popen.c	2010-02-10 04:17:42 UTC (rev 40903)
+++ grass/trunk/lib/gis/popen.c	2010-02-10 04:18:26 UTC (rev 40904)
@@ -9,13 +9,13 @@
 #ifdef __MINGW32__
 #include <io.h>
 #include <fcntl.h>
-#define pipe(fds) _pipe(fds, 4096, O_BINARY)
+#define pipe(fds) _pipe(fds, 4096, O_BINARY|O_NOINHERIT)
 #endif
 
 static FILE *do_popen(struct Popen *state, int wr,
 		      const char *program, const char **args)
 {
-    const char *which = wr ? SF_STDIN : SF_STDOUT;
+    int which = wr ? 0 : 1;
     const char *dir = wr ? "w" : "r";
     int pfd, cfd;
     int pipe_fds[2];



More information about the grass-commit mailing list