Fix handling of closed stdin/stdout/stderr on mingw.
[pspp] / ChangeLog
index 8b9a56b473bb0229e60be8d3cf6b9dd132282698..44d91e6ea8311a7bb8c8eb27b4be5d63d315a672 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,94 @@
+2009-07-19  Bruno Haible  <bruno@clisp.org>
+
+       Fix handling of closed stdin/stdout/stderr on mingw.
+       * lib/w32spawn.h: Include unistd.h.
+       (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
+       file descriptor with O_NOINHERIT flag.
+       (fd_safer_noinherit): New function, based on fd-safer.c.
+       (dup_safer_noinherit): New function, based on dup-safer.c.
+       (undup_safer_noinherit): New function.
+       * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
+       dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
+       * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
+       instead of fd_safer.
+       * tests/test-pipe.c: Include <windows.h>.
+       (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close() result.
+
+       * tests/test-pipe.c (child_main, parent_main): New functions, extracted
+       from main.
+       (test_pipe): Pass an extra argument for disambiguation.
+       (main): Invoke parent_main or child_main.
+
+       * tests/test-pipe.c (test_pipe): Pass slave_process = true argument
+       consistently.
+
+2009-07-18  Eric Blake  <ebb9@byu.net>
+
+       test-pipe: fix mingw build
+       * tests/test-pipe.c (main): Avoid fcntl on mingw.
+
+2009-07-18  Bruno Haible  <bruno@clisp.org>
+
+       * modules/pipe-tests (Makefile.am): Fix typo.
+
+2009-07-18  Eric Blake  <ebb9@byu.net>
+
+       error: fix mingw build
+       * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
+       Reported by Bruno Haible.
+
+       error: avoid undefined use of stdout
+       * lib/error.c (error, error_at_line): Check that fd 1 is open
+       before flushing stdout.  Avoids a crash on cygwin when libsigsegv
+       is handling faults and the close_stdout module wants to report the
+       detection of closed stdout as an error.
+
+2009-07-17  Eric Blake  <ebb9@byu.net>
+
+       pipe: be robust in face of closed fds
+       * lib/pipe.c (create_pipe): Closed standard descriptors in parent
+       should cause child to misbehave.
+       * modules/pipe-tests: New module.
+       * tests/test-pipe.c: New file.
+       * tests/test-pipe.sh: New file.
+       Reported by Akim Demaille.
+
+2009-07-14  Bruno Haible  <bruno@clisp.org>
+
+       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
+       Reported by anonymous kc.
+
+2009-07-07  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: don't look for translatable strings in *.m4 or *.mk
+       * top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
+       when searching for translatable strings.
+
+2009-07-05  Jim Meyering  <meyering@redhat.com>
+
+       remove superfluous parentheses in STREQ definition
+       * tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
+       * lib/getugroups.c (STREQ): Likewise.
+       * lib/fnmatch.c (STREQ): Likewise.
+       Spotted by Bruno Haible.
+
+2009-07-04  Jim Meyering  <meyering@redhat.com>
+
+       argv-iter: new module
+       * MODULES.html.sh: Add argv-iter.
+       * lib/argv-iter.c, lib/argv-iter.h: New files.
+       * modules/argv-iter: New file.
+       * modules/argv-iter-tests: New file.
+       * tests/test-argv-iter.c: Test it.
+
+2009-07-04  Bruno Haible  <bruno@clisp.org>
+
+       Fix assertion.
+       * lib/git-merge-changelog.c (compute_mapping): In the case where file1
+       contains more exact copies of a given entry than file2, leave the extra
+       copies unpaired rather than aborting.
+       Reported by Eric Blake.
+
 2009-07-02  Bruno Haible  <bruno@clisp.org>
 
        Speedup git-merge-changelog for git cherry-pick.