public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.3
Date: Fri, 30 Aug 2019 20:21:00 -0000	[thread overview]
Message-ID: <20190830193149.GA4164@calimero.vinschen.de> (raw)
In-Reply-To: <20190831032003.d19fb7060c632bb51777c0de@nifty.ne.jp>

[-- Attachment #1: Type: text/plain, Size: 2975 bytes --]

On Aug 31 03:20, Takashi Yano wrote:
> On Fri, 30 Aug 2019 09:55:23 +0200
> Corinna Vinschen wrote:
> > On Aug 29 22:15, Biswapriyo Nath wrote:
> > > On Thursday, August 29, 2019, Corinna Vinschen <corinna-cygwin@cygwin.com>
> > > 1a. In fhandler_pty_mater::ioctl function, shouldn't the function pointer
> > > be checked before use? Also what the FIXME says, isn't clear. Any hint?
> > 
> > Yeah, right.  What happens on pre-W10 1809 systems?  They probably
> > crash on TIOCSWINSZ.  See below.
> 
> This code is protected by
> if (getPseudoConsole () && ...
> that is, pseudo console handle is set only if CreatePseudoConsole()
> successes. In pre-W10 1809, since pseudo console handle is not set,
> this code is not reached. However, it is better to check before
> call as you suggest.
> 
> What is meant in FIXME comment:
> ResizePseudoConsole() needs handle to pseudo console. This handle is
> valid only in the process which created it. If ioctl(TIOCSWINSZ, ...)
> is called from other process, it fails. I had tried DuplicateHandle(),
> but it did not work. Therefore, ResizePseudoConsole() is called
> only if ioctl() is called from PTY master process. Similarly,
> ClosePseudoConsole() can work only in the master process.

Ah, that makes sense.

> > > 1b. GetModuleHandle and GetProcessHeap is called several times. Wouldn't be
> > > it easier to get all the pseudo console function pointers in one
> > > constructor?
> > 
> > In terms of GetModuleHandle/GetProcAddress the right thing to do is to
> > use the autoload feature, i.e., add the functions to autoload.cc like
> > this:
> > 
> >   LoadDLLfuncEx (ClosePseudoConsole, 4, kernel32, 1)
> >   LoadDLLfuncEx (CreatePseudoConsole, 20, kernel32, 1)
> >   LoadDLLfuncEx (ResizePseudoConsole, 8, kernel32, 1)
> > 
> > If the function call returns FALSE with GetLastError() ==
> > ERROR_PROC_NOT_FOUND, then the function is not available.
> > 
> > Takashi, I didn't actually notice the usage of the Windows heap here.
> > The usual method is to use a tls_pbuf buffer, and rather than
> > using MultiByteToWideChar/WideCharToMultiByte, use sys_mbstowcs/
> > sys_wcstombs.
> > 
> > Also, can you please change the camelback names in class tty_min to
> > underscored writing, e.g., term_codepage rather than TermCodePage?
> 
> OK. I will revised the code followed to your advice.
> 
> First, I would like to fix some bugs and will post a patch.
> Second, I will revise the coding style.
> 
> May I post them as indivisual patches?

That would be great.  Individual patches with each of them fixing just
a single problem are definitely preferrable over bulk patches.  Please
send them to the cygwin-patches mailing list.

>  I also suppose the patch should be against the v9 patch, right?

Well, actually they should be against current git master.  Incidentally
that's your v9 patch ;)


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-08-30 19:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 12:47 Corinna Vinschen
2019-08-29 16:51 ` Biswapriyo Nath
2019-08-30  8:11   ` Corinna Vinschen
2019-08-30 19:16     ` Takashi Yano
2019-08-30 20:21       ` Corinna Vinschen [this message]
2019-08-31  3:58       ` Biswapriyo Nath
2019-08-31  4:21         ` Takashi Yano
2019-09-01  6:32           ` Biswapriyo Nath
2019-09-02  8:17             ` Corinna Vinschen
2019-09-03  9:28               ` Biswapriyo Nath
2019-09-03 10:48                 ` Corinna Vinschen
2019-09-05 18:11         ` Jim Reisert AD1C
2019-09-06  2:23           ` Ken Brown
2019-09-06  5:22             ` Jim Reisert AD1C
2019-09-06 10:03 ` Thomas Wolff
2019-09-07  3:32   ` Takashi Yano
2019-09-07 11:53     ` Thomas Wolff

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=20190830193149.GA4164@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.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).