+2009-07-20 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
+ (main): Use it.
+
+2009-07-20 Eric Blake <ebb9@byu.net>
+
+ test-pipe: make a bit more robust.
+ * tests/test-pipe.c (myerr): Allow error messages regardless of
+ what we do to stderr.
+ (test_pipe): Rearrange to avoid deadlock.
+ (child_main): Try a larger read, to ensure we avoided deadlock.
+ * lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
+ * lib/pipe.h (create_pipe_bidi): Document potential for deadlock
+ if misused.
+
+2009-07-19 Jim Meyering <meyering@redhat.com>
+
+ fts: avoid false-positive cycle-detection
+ * lib/fts.c (fts_read): Reinitialize cycle-detection data structures
+ for each new command line argument.
+
+2009-07-19 Bruno Haible <bruno@clisp.org>
+
+ Fix build error on mingw with the modules sys_select and unistd.
+ * modules/acl-tests (Depends-on): Add close.
+ * modules/binary-io-tests (Depends-on): Likewise.
+ * modules/closein-tests (Depends-on): Likewise.
+ * modules/flock-tests (Depends-on): Likewise.
+ * modules/fsync-tests (Depends-on): Likewise.
+ * modules/lseek-tests (Depends-on): Likewise.
+ * modules/pipe-tests (Depends-on): Likewise.
+ * modules/posix_spawn-tests (Depends-on): Likewise.
+ * modules/posix_spawnp-tests (Depends-on): Likewise.
+ * modules/stat-time-tests (Depends-on): Likewise.
+ * modules/yesno-tests (Depends-on): Likewise.
+
+2009-07-19 Bruno Haible <bruno@clisp.org>
+
+ Unify conditionals.
+ * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
+ macros, not at the compiler macros.
+ * lib/pipe.c: Likewise.
+ * lib/execute.c: Likewise.
+ * lib/spawni.c: Likewise.
+
+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