Re: [PATCH 1/1] Cygwin: don't allow getpgrp() to fail

2019-07-24 Thread Ken Brown
On 7/23/2019 3:16 PM, Corinna Vinschen wrote: > On Jul 23 19:07, Jon Turney wrote: >> On 23/07/2019 17:54, Corinna Vinschen wrote: >>> Hi Ken, >>> >>> On Jul 23 16:12, Ken Brown wrote: According to POSIX, "The getpgrp() function shall always be successful and no return value is reserved t

Re: [PATCH 1/1] Cygwin: don't allow getpgrp() to fail

2019-07-24 Thread Corinna Vinschen
On Jul 24 15:04, Ken Brown wrote: > On 7/23/2019 3:16 PM, Corinna Vinschen wrote: > > On Jul 23 19:07, Jon Turney wrote: > >> On 23/07/2019 17:54, Corinna Vinschen wrote: > >>> Hi Ken, > >>> > >>> On Jul 23 16:12, Ken Brown wrote: > According to POSIX, "The getpgrp() function shall always be s

[PATCH] Cygwin: fhandler_termios::tcsetpgrp: check that argument is non-negative

2019-07-24 Thread Ken Brown
Return -1 with EINVAL if pgid < 0. This fixes the gdb problem reported here: https://cygwin.com/ml/cygwin/2019-07/msg00166.html --- winsup/cygwin/fhandler_termios.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc

Re: [PATCH] Cygwin: fhandler_termios::tcsetpgrp: check that argument is non-negative

2019-07-24 Thread Corinna Vinschen
On Jul 24 15:34, Ken Brown wrote: > Return -1 with EINVAL if pgid < 0. This fixes the gdb problem > reported here: Why does it fix the issue? > https://cygwin.com/ml/cygwin/2019-07/msg00166.html > --- > winsup/cygwin/fhandler_termios.cc | 5 + > 1 file changed, 5 insertions(+) > > diff -

[PATCH] Cygwin: Fix the address of myself

2019-07-24 Thread Corinna Vinschen
From: Corinna Vinschen Introducing an independent Cygwin PID introduced a regression: The expectation is that the myself pinfo pointer always points to a specific address right in front of the loaded Cygwin DLL. However, commit b5e1003722cb14235c4f166be72c09acdffc62ea "Cygwin: processes: use de

[PATCH v2] Cygwin: Fix the address of myself

2019-07-24 Thread Corinna Vinschen
From: Corinna Vinschen v2: rephrase commit message Introducing an independent Cygwin PID introduced a regression: The expectation is that the myself pinfo pointer always points to a specific address right in front of the loaded Cygwin DLL. However, the independent Cygwin PID changes broke this

Re: [PATCH 1/1] Cygwin: don't allow getpgrp() to fail

2019-07-24 Thread Ken Brown
On 7/24/2019 11:04 AM, Ken Brown wrote: > But I still think getpgrp() should be changed I've decided not to pursue this. I don't think it's very important, and I don't know how it might affect applications. Ken

Re: [PATCH v2] Cygwin: Fix the address of myself

2019-07-24 Thread Ken Brown
On 7/24/2019 12:54 PM, Corinna Vinschen wrote: > From: Corinna Vinschen > > v2: rephrase commit message > > Introducing an independent Cygwin PID introduced a regression: > > The expectation is that the myself pinfo pointer always points to a > specific address right in front of the loaded Cygw