[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with create_pipe_bidi
From: |
Eric Blake |
Subject: |
Re: Help with create_pipe_bidi |
Date: |
Mon, 20 Jul 2009 22:06:24 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> always report ASSERT failures to the original stderr,
> regardless of what the test did to fd 2.
Well, it would work if mingw's dup2 weren't broken. On mingw, dup2 always
returns 0 for success, rather than the fd just opened.
> + /* We might close fd 2 later, so save it in fd 10. */
> + if (dup2 (STDERR_FILENO, 10) != 10
> + || (myerr = fdopen (10, "w")) == NULL)
> + return 2;
> + return parent_main (argc, argv);
> }
So I guess I'll start the process of writing a dup2 replacement module;
meanwhile, we can just use the hack of checking that the dup2 result in this
test was non-negative.
--
Eric Blake
- Re: building directly from $(top_builddir), (continued)
Re: Help with create_pipe_bidi, Eric Blake, 2009/07/18
Re: Help with create_pipe_bidi, Eric Blake, 2009/07/17
- Re: Help with create_pipe_bidi, Eric Blake, 2009/07/17
- Re: Help with create_pipe_bidi, Bruno Haible, 2009/07/18
- Re: Help with create_pipe_bidi, Eric Blake, 2009/07/18
- Re: Help with create_pipe_bidi, Bruno Haible, 2009/07/19
- Re: Help with create_pipe_bidi, Eric Blake, 2009/07/20
- Re: Help with create_pipe_bidi, Bruno Haible, 2009/07/20
- Re: Help with create_pipe_bidi,
Eric Blake <=
- Re: dup2 on mingw, Bruno Haible, 2009/07/20
- Re: dup2 on mingw, Eric Blake, 2009/07/21
- Re: dup2 on mingw, Eric Blake, 2009/07/21
- Re: dup2 on mingw, Eric Blake, 2009/07/21
Re: Help with create_pipe_bidi, Bruno Haible, 2009/07/18