Fix tcgetpgrp output

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Oct 7 07:52:00 GMT 2009


On Oct  6 14:24, Christopher Faylor wrote:
> 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.

Thanks, applied.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-patches mailing list