From: Bruno Haible Date: Thu, 31 May 2007 01:09:03 +0000 (+0000) Subject: Explicitly close file descriptors where needed. X-Git-Tag: cvs-readonly~315 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=136c0c98973f8e9a7575cd6e07c9ea4865da2e5d;p=gnulib.git Explicitly close file descriptors where needed. --- diff --git a/ChangeLog b/ChangeLog index e9eb64d07..4218544b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-30 Bruno Haible + + * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before + assuming that they are closed. Needed on HP-UX 11. + 2007-05-29 Bruno Haible Fix a problem with #include_next. diff --git a/tests/test-lseek.c b/tests/test-lseek.c index d70629e1c..f8fcfec36 100644 --- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -72,6 +72,10 @@ main (int argc, char **argv) break; case '2': /* closed */ + /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the + invoking shell are not enough on HP-UX. */ + close (0); + close (1); errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF);