diff options
author | Bruno Haible <bruno@clisp.org> | 2007-05-31 01:09:03 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-05-31 01:09:03 +0000 |
commit | 136c0c98973f8e9a7575cd6e07c9ea4865da2e5d (patch) | |
tree | 82217ad68964aefaeebc16b420ac7b7f473ac48c /tests/test-lseek.c | |
parent | c63680ec113137bebde908d1193bc5b3b51e2e19 (diff) | |
download | gnulib-136c0c98973f8e9a7575cd6e07c9ea4865da2e5d.tar.gz |
Explicitly close file descriptors where needed.
Diffstat (limited to 'tests/test-lseek.c')
-rw-r--r-- | tests/test-lseek.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-lseek.c b/tests/test-lseek.c index d70629e1cd..f8fcfec36d 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); |