Merge branch 'stable'
[gnulib.git] / tests / test-openpty.c
index 4012e16..f491e33 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of pty.h and openpty function.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -99,6 +99,10 @@ main ()
           return 1;
         }
     }
+
+    /* Close the master side before the slave side gets closed.
+       This is necessary on MacOS X 10.4.11.  */
+    close (master);
   }
 
   return 0;