Skip to content
  • Chun-wei Fan's avatar
    glib/gspawn-win32-helper.c: Clean up a bit · 5fd3c63a
    Chun-wei Fan authored
    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
    5fd3c63a