glib/gspawn-win32-helper.c: Clean up a bit
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 5 Nov 2013 07:51:08 +0000 (15:51 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 11 Nov 2013 14:37:10 +0000 (22:37 +0800)
commit5fd3c63ae8ab3923fa7963832dadde1d065a1e48
tree18f51776c7e20ea60a15c84cec4b82576bfa151c
parentccba409d349211d0705a8ae1fcf0f88fbb370175
glib/gspawn-win32-helper.c: Clean up a bit

Remove the parts about storing up the fd's in a data structure, but call
close() on the fd's.  However, retain the _get_osfhandle() check on the
fd's when we iterate through the fd's as on fd values in the iteration may
well be invalid fd's.  As a result, the invalid parameter handler is still
needed for newer Microsoft CRTs (8.0/2005+) for _get_osfhandle() to
make sure that the program does not abort when we check the validity of
fd's to be closed in the loop[1].

[1]: http://msdn.microsoft.com/en-us/library/ks2530z6%28v=vs.80%29.aspx
glib/gspawn-win32-helper.c