4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-20 13:29:24 +08:00
Ken Brown 8a46b8ede2 Cygwin: fhandler_termios::tcsetpgrp: check that argument is non-negative
Return -1 with EINVAL if pgid < 0.

Previously tcsetpgrp() would blindly go ahead and set the pgid of the
controlling terminal to a negative value, causing later calls to
various functions to fail.

For example, gdb has code like the following:

  tcsetpgrp (0, getpgid (inf->pid));

If getpgid (inf->pid) fails (returns -1), then this code would set the
pgid of fd 0 to -1, so that some later calls to getpgid() would also
return -1.  This caused the problem reported here:

  https://cygwin.com/ml/cygwin/2019-07/msg00166.html.
2019-07-24 13:26:08 -04:00
..
2016-11-24 16:09:31 +01:00
2016-06-25 00:43:01 +02:00
2019-01-15 22:02:33 +01:00
2019-01-15 22:02:33 +01:00
2019-01-15 22:02:33 +01:00
2019-06-05 13:53:44 +02:00
2018-02-20 17:59:53 +01:00
2017-03-27 22:03:58 +01:00
2019-04-16 12:54:43 +02:00
2018-04-16 22:46:11 -05:00
2018-02-07 13:07:44 +01:00
2019-03-27 14:01:45 +01:00
2019-06-25 15:44:43 -04:00
2019-06-25 15:44:43 -04:00
2016-06-23 16:56:41 +02:00
2019-03-24 22:13:00 +01:00
2019-07-19 14:14:33 -04:00