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/msg00166.html. See especially the comments in https://cygwin.com/ml/cygwin/2019-07/msg00208.html about bash. Although my patch does fix the specific problem I reported about debugging bash, I'm not sure what other side-effects it might have. Ken Ken Brown (1): Cygwin: don't allow getpgrp() to fail winsup/cygwin/syscalls.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.21.0