[PATCH] Cygwin: exceptions.cc: Suspend all threads in sig_handle_tty_stop().

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently, thread created by pthread_create() is not suspended by the signal SIGTSTP. For example, even if a process with a thread is suspended by Ctrl-Z, the thread continues running. This patch fixes the issue. --- winsup/cygwin/exceptions.cc | 2 ++ 1 file changed, 2 insertions(+)

[PATCH] Cygwin: console: Align the behaviour against signal with pty.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently, read() returns -1 with EINTR if the process is suspended by Ctrl-Z and resumed by fg command, while pty continues to read. For example, xxd command stops with error "Interrupted system call" after Ctrl-Z and fg. This patch aligns the behaviour with pty (and Linux). ---

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Ken Brown via Cygwin-patches
On 1/28/2021 11:13 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 17:07, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 27 21:51, Ken Brown via Cygwin-patches

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Ken Brown via Cygwin-patches
On 1/28/2021 11:07 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: According to the Linux man page for getdtablesize(3),

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Brian Inglis
On 2021-01-28 10:17, Brian Inglis wrote: On 2021-01-28 03:14, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 11:08, Corinna Vinschen via Cygwin-patches wrote: Hi Marek, thanks for the patch.  [...] index 17e8d83a3..933851c21 100644 --- a/winsup/cygwin/include/sys/termios.h +++

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Brian Inglis
On 2021-01-28 03:14, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 11:08, Corinna Vinschen via Cygwin-patches wrote: Hi Marek, thanks for the patch. [...] index 17e8d83a3..933851c21 100644 --- a/winsup/cygwin/include/sys/termios.h +++ b/winsup/cygwin/include/sys/termios.h @@ -185,6

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 17:07, Corinna Vinschen via Cygwin-patches wrote: > On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: > > On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: > > > On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > > > > According to the Linux man page for

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: > On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: > > On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > > > According to the Linux man page for getdtablesize(3), the latter is > > > supposed to return "the maximum number of

[PATCH v3 2/2] Cygwin: pty: Make slave read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently slave read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 06fc19ac2..48b89ae77 100644 ---

[PATCH v3 1/2] Cygwin: console: Make read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 10 ++ winsup/cygwin/fhandler_console.cc | 11 ++- winsup/cygwin/fhandler_termios.cc | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git

[PATCH v3 0/2] Make terminal read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
Currently read() for console and pty slave are somehow not thread-safe. These patches fix the issue. Takashi Yano (2): Cygwin: console: Make read() thread-safe. Cygwin: pty: Make slave read() thread-safe. winsup/cygwin/fhandler.h | 10 ++ winsup/cygwin/fhandler_console.cc |

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Ken Brown via Cygwin-patches
On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: According to the Linux man page for getdtablesize(3), the latter is supposed to return "the maximum number of files a process can have open, one more than the largest possible

Re: [PATCH v2 1/2] Cygwin: console: Make read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
On Thu, 28 Jan 2021 21:20:09 +0900 Takashi Yano wrote: > - Currently read() is somehow not thread-safe. This patch fixes the > issue. > --- > winsup/cygwin/fhandler_console.cc | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Sorry again. This also has a problem.. --

[PATCH v2 2/2] Cygwin: pty: Make slave read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently slave read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 06fc19ac2..48b89ae77 100644 ---

[PATCH v2 1/2] Cygwin: console: Make read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 02d0ac052..d0e5bb33a

[PATCH v2 0/2] Make terminal read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
Currently read() for console and pty slave are somehow not thread-safe. These patches fix the issue. Takashi Yano (2): Cygwin: console: Make read() thread-safe. Cygwin: pty: Make slave read() thread-safe. winsup/cygwin/fhandler_console.cc | 10 +- winsup/cygwin/fhandler_tty.cc |

Re: [PATCH 1/2] Cygwin: console: Make read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
On Thu, 28 Jan 2021 20:14:08 +0900 Takashi Yano wrote: > - Currently read() is somehow not thread-safe. This patch fixes the > issue. > --- > winsup/cygwin/fhandler_console.cc | 7 +++ > winsup/cygwin/select.cc | 3 --- > 2 files changed, 3 insertions(+), 7 deletions(-) Sorry,

[PATCH 2/2] Cygwin: pty: Make slave read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently slave read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 06fc19ac2..48b89ae77 100644 ---

[PATCH 1/2] Cygwin: console: Make read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
- Currently read() is somehow not thread-safe. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 7 +++ winsup/cygwin/select.cc | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc

[PATCH 0/2] Make terminal read() thread-safe.

2021-01-28 Thread Takashi Yano via Cygwin-patches
Currently read() for console and pty slave are somehow not thread-safe. These patches fix the issue. Takashi Yano (2): Cygwin: console: Make read() thread-safe. Cygwin: pty: Make slave read() thread-safe. winsup/cygwin/fhandler_console.cc | 7 +++ winsup/cygwin/fhandler_tty.cc | 6

Re: [PATCH v7 0/4] Improve pseudo console support.

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 28 12:26, Takashi Yano via Cygwin-patches wrote: > The new implementation of pseudo console support by commit bb428520 > provides the important advantages, while there also has been several > disadvantages compared to the previous implementation. > > These patches overturn some of them. >

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 27 21:51, Ken Brown via Cygwin-patches wrote: > According to the Linux man page for getdtablesize(3), the latter is > supposed to return "the maximum number of files a process can have > open, one more than the largest possible value for a file descriptor." > The constant OPEN_MAX_MAX is

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
Oh, btw... On Jan 28 11:08, Corinna Vinschen via Cygwin-patches wrote: > Hi Marek, > > thanks for the patch. [...] > > index 17e8d83a3..933851c21 100644 > > --- a/winsup/cygwin/include/sys/termios.h > > +++ b/winsup/cygwin/include/sys/termios.h > > @@ -185,6 +185,7 @@ POSIX commands */ > >

Re: fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
Hi Marek, thanks for the patch. This is a patch adding functionality so it's not trivial. Would you mind to express your willingness to put this patch as well as further patches under 2-clause BSD license per the "Before you get started" section of https://cygwin.com/contrib.html? A few minor

Re: [PATCH v2] Cygwin: fchmodat: add limited support for AT_SYMLINK_NOFOLLOW

2021-01-28 Thread Corinna Vinschen via Cygwin-patches
On Jan 27 13:53, Ken Brown via Cygwin-patches wrote: > Allow fchmodat with the AT_SYMLINK_NOFOLLOW flag to succeed on > non-symlinks. Previously it always failed, as it does on Linux. But > POSIX permits it to succeed on non-symlinks even if it fails on > symlinks. > > The reason for following