On Fri, Jul 08, 2011 at 12:37:48AM +0200, Erik Faye-Lund wrote: > > Yeah, exactly. The current code is already using dup2 in the same way. > > It does, but I'm not entirely sure how dup2 works when start_async is > implemented with threads. Won't cause the multiplexer to fail (the > multiplexer and the archive-thread needs different stdouts), because > file descriptors are process-resources, and not thread-resources? Oh, right. I'm being a moron. Sorry. > I guess I could dup stdout/stderr before dup2'ing, and have the > multiplexer write to explicitly to the duped fds. It's starting to > sound very confusing to my ears, but perhaps it's the best option > still ;) Yes, you would have to dup stdout in the muxer to a new fd, then write to that explicitly. And then you would be free to dup the write half of the async pipe to stdout. It's not all that complicated, but maybe it is simpler and more obvious (especially to a later reader of the code) to just run a separate command. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html