This patch makes getpgrp() conform to POSIX. I have some qualms about
it because getpgrp() will now return 0 in cases where it would
previously return -1. I don't know if this is likely to break any
applications.
The patch fixes the problem reported here:
https://cygwin.com/ml/cygwin/2019-07/
According to POSIX, "The getpgrp() function shall always be successful
and no return value is reserved to indicate an error." Cygwin's
getpgrp() is defined in terms of getpgid(), which is allowed to fail.
Change getpgrp() so that it doesn't fail even if getpgid() fails.
---
winsup/cygwin/syscalls
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 to indicate an error." Cygwin's
> getpgrp() is defined in terms of getpgid(), which is allowed to fail.
But it shouldn't fail for the current proce
On Jul 23 18: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 to indicate an error." Cygwin's
> > getpgrp() is defined in terms of getpgid(), which is allowed
On Jul 23 18:59, Corinna Vinschen wrote:
> On Jul 23 18: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 to indicate an error." Cygwin's
> > > getpgr
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 to indicate an error." Cygwin's
getpgrp() is defined in terms of getpgid(), which is allowed to fail.
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 to indicate an error." Cygwin's
> > > getpgrp(