C++ Logo


Advanced search

Re: [std-proposals] A standard way to redirect all standard output

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 13 Mar 2023 11:51:03 -0700
On Monday, 13 March 2023 11:42:29 PDT Frederick Virchanza Gotham via Std-
Proposals wrote:
> That's what I thought too, but it doesn't. I need all three modifications
> in my aforementioned program, so maybe printf and cout go straight to an
> x86 syscall instruction. (I ran objdump on my binary and I could see some
> inline x86 syscall instructions).

Your investigation is wrong. On POSIX systems, writing to stdout will cause a
write() to STDOUT_FILENO, which is 1. That's required.

Anyway, POSIX is out of scope and is a solved problem.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-03-13 18:51:04