Fix tcgetpgrp output
Christopher Faylor
cgf-use-the-mailinglist-please@cygwin.com
Tue Oct 6 18:24:00 GMT 2009
On Tue, Oct 06, 2009 at 11:08:53AM +0200, Corinna Vinschen wrote:
>Hi,
>
>
>I'd like to have your opinion for this patch before I check it in, since
>I'm not sure this is the right way to fix it.
>
>When I debugged the luit/tcsh problem yesterday, I found that the
>tcgetpgrp function does not behave as advertised.
>
>Per POSIX, the tcgetpgrp function returns the pgrp ID only if the file
>descriptor references the controlling tty of the process. If the
>process has no ctty, or if the descriptor references another tty not
>being the controlling tty, the function is supposed to set errno to
>ENOTTY and return -1.
Ouch. I can't believe that behavior has lasted for so long.
The patch looks good to me.
cgf
More information about the Cygwin-patches
mailing list