From: Eli Zaretskii <eliz@gnu.org>
To: Roy Qu <royqh1979@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: the redirected stdin/out/err for new console is wrong when the gdb's stdin/out/err is already redirected
Date: Fri, 02 Oct 2020 22:50:01 +0300 [thread overview]
Message-ID: <83h7rce7bq.fsf@gnu.org> (raw)
In-Reply-To: <CAKjWZNXKFTKV7SsN066+bY-ocB32EC1gSSwbKO_Nqu9Dj8qzbQ@mail.gmail.com> (message from Roy Qu on Sat, 3 Oct 2020 00:22:46 +0800)
[Please use Reply All to reply, so that the list is CC'ed.]
> From: Roy Qu <royqh1979@gmail.com>
> Date: Sat, 3 Oct 2020 00:22:46 +0800
>
> Eli Zaretskii <eliz@gnu.org> 于2020年10月2日周五 下午10:49写道:
>
> [Please use Reply All to reply, so that the list is CC'ed.]
Please do, you continue replying only to me, which requires me to
quote the entire message sent by you to the list, and also prevents
others from replying in a timely manner.
>
> > From: Roy Qu <royqh1979@gmail.com>
> > Date: Fri, 2 Oct 2020 21:58:13 +0800
> >
> >
> https://stackoverflow.com/questions/30494945/createprocess-with-new-console-window-but-override-some-std-i-o-handles
>
> >
> > Point 1.You are right, NULL doesn't work under windows 7.
> > So we need a better solution here.
>
> OK.
>
> > Point 2. When GDB's standard output is not redirected (started in console) , the inferior's ouput will
> go to it's
> > own console, not the gdb's console.
>
> Really? I thought this happens only if you say
>
> (gdb) set new-console 1
>
> If I'm wrong, then where is the code which causes that other console
> to be created for the inferior?
>
> Yes. Can we add a check here to see if there should be a new console ?
Probably, but I hope someone else will explain how to do that.
And if we do have such a test, how will that affect the issue you
would like to solve? Does the problem only happen when the inferior
has a separate console?
next prev parent reply other threads:[~2020-10-02 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 12:21 Roy Qu
2020-09-28 12:40 ` Eli Zaretskii
[not found] ` <CAKjWZNWC3ZsR-D8ZPMS5qdhBg5WeWv0p=D9ncdAQua9aKYbSMg@mail.gmail.com>
2020-10-02 12:17 ` Eli Zaretskii
[not found] ` <CAKjWZNXxSfSKEcXMfK4P4NJtWtaP0t84k5W1VUEDqX5ofXLa6A@mail.gmail.com>
2020-10-02 14:49 ` Eli Zaretskii
[not found] ` <CAKjWZNXKFTKV7SsN066+bY-ocB32EC1gSSwbKO_Nqu9Dj8qzbQ@mail.gmail.com>
2020-10-02 19:50 ` Eli Zaretskii [this message]
2020-10-06 13:13 ` Roy Qu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h7rce7bq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=royqh1979@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).