[PATCH] Cygwin: console: Make the console accessible from other terminals.

Takashi Yano takashi.yano@nifty.ne.jp
Thu Dec 22 12:15:04 GMT 2022


On Thu, 22 Dec 2022 18:06:03 +0900
Takashi Yano <takashi.yano@nifty.ne.jp> wrote:

> On Wed, 21 Dec 2022 13:56:25 +0100
> Corinna Vinschen wrote:
> > However, there's something broken with these patches in terms of
> > debugging:
> > 
> > With current origin/master:
> > 
> >   $ ls -l  /dev/cons0
> >   crw-rw-rw- 4 corinna vinschen 3, 0 Dec 21 13:46 /dev/cons0
> >   $ strace -o xxx /bin/ls /dev/cons0
> >   /dev/cons0
> > 
> > After applying "pinfo: Align CTTY behavior to the statement of POSIX."
> > 
> >   $ ls -l /dev/cons0
> >   crw-rw-rw- 4 corinna vinschen 3, 0 Dec 21 13:51 /dev/cons0
> >   $ strace -o xxx /bin/ls /dev/cons0
> >   /usr/bin/ls: cannot access '/dev/cons0': No such device or address
> > 
> > "devices: Make generic console devices invisible from pty." doesn't
> > change this, but after applying "console: Make the console accessible
> > from other terminals.":
> > 
> >   $ ls -l /dev/cons0
> >   crw------- 4 corinna vinschen 3, 0 Dec 21 13:55 /dev/cons0
> >   $ strace -o xxx /bin/ls /dev/cons0
> >    670400 [main] ls 1630 C:\cygwin64\bin\ls.exe: *** fatal error - MapViewOfFileEx '(null)'(0x54), Win32 error 487.  Terminating.
> >    674526 [main] ls 1630 cygwin_exception::open_stackdumpfile: Dumping stack trace to ls.exe.stackdump
> > 
> > FWIW:
> > 
> >   $ strace -o xxx /bin/ls
> >    673796 [main] ls 1633 C:\cygwin64\bin\ls.exe: *** fatal error - MapViewOfFileEx '(null)'(0x54), Win32 error 487.  Terminating.
> >    676814 [main] ls 1633 cygwin_exception::open_stackdumpfile: Dumping stack trace to ls.exe.stackdump
> 
> Thank you for finding this. I think this can be easily fixed.
> Please see v3 patch.
> 
> [PATCH v3] Cygwin: pinfo: Align CTTY behavior to the statement of POSIX.

After the commit f6e4e98d3071, the patch
[PATCH v2] Cygwin: console: Make the console accessible from other terminals.
cannot be applied cleanly.

Please review v3 patch.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-patches mailing list