New implementation of pseudo console support (experimental)
Corinna Vinschen
corinna-cygwin@cygwin.com
Sun Aug 2 12:01:04 GMT 2020
Hi Takashi,
On Jul 24 20:22, Takashi Yano via Cygwin-developers wrote:
> On Fri, 24 Jul 2020 14:38:42 +0900
> Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com> wrote:
> > On Thu, 23 Jul 2020 09:33:28 +0900
> > Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com> wrote:
> > > On Wed, 22 Jul 2020 17:45:41 +0900
> > > Takashi Yano via Cygwin-developers <cygwin-developers@cygwin.com> wrote:
> > > > > [...]
> > > > Attached is the patch in git format-patch format.
> > > > All the codes specific to the current implementation are removed.
> > > >
> > > > Despite the utmost care, the changes are relatively large, so some
> > > > degradation may exist.
> > > >
> > > > I will appreciate if you could test.
> > >
> > > There were still unused code. Please try attached patch instead.
> >
> > Changes:
> > * Do not activate pseudo console if it is already activated for
> > another process on same pty.
>
> Changes:
> * Fix a bug in the latest change.
>
> --
> Takashi Yano <takashi.yano@nifty.ne.jp>
While hacking on the posix_spawn thingy, I noticed this hunk of yours:
@@ -897,6 +910,11 @@ child_info_spawn::worker (const char *prog_arg, const char
*const *argv,
&& WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT)
wait_for_myself ();
}
+ if (enable_pcon)
+ {
+ WaitForSingleObject (pi.hProcess, INFINITE);
+ ptys_primary->close_pseudoconsole ();
+ }
myself.exit (EXITCODE_NOSET);
break;
case _P_WAIT:
Wait... what? So the exec'ing process hangs infinitely if the exec'ed
process runs infinitely? Doesn't that have weird side effects by any
chance?
Thanks,
Corinna
More information about the Cygwin-developers
mailing list