This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix tcgetpgrp output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]