# HG changeset patch # User Bruno Haible # Date 1180573743 0 # Node ID 33db9cbd68d7fdc266c59439720406639b0657b0 # Parent eb07e44564a458b0a22fd0fcd8920b5b2cf66a60 Explicitly close file descriptors where needed. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -72,6 +72,10 @@ 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);