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

SF_CLOSE_DESCRIPTOR should actually close the descriptor

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

+ 3 - 1
lib/gis/spawn.c

@@ -433,8 +433,10 @@ static void do_redirects(struct redirect *redirects, int num_redirects, HANDLE h
 	else if (r->src_fd >= 0) {
 	    handles[r->dst_fd] = get_handle(r->src_fd);
 	}
-	else
+	else {
 	    handles[r->dst_fd] = INVALID_HANDLE_VALUE;
+	    close(r->dst_fd);
+	}
     }
 }