Переглянути джерело

G_spawn_ex() expects descriptors as "int"s, not "char*".

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40904 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 роки тому
батько
коміт
770e798241
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      lib/gis/popen.c

+ 2 - 2
lib/gis/popen.c

@@ -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];