Hi Takashi,

On Dec 28 17:35, Takashi Yano wrote:
> The commit 25c4ad6ea52f did not fix the CTTY behavior enough. For
> example, in the following test case, TTY will be associated as
> a CTTY on the second open() call even though the TTY is already
> CTTY of another session. This patch fixes the issue.

The patch is ok, thanks.

But while looking into this patch, I realized how confusing the old code
is.  An unsuspecting reader will have a really hard time to figure out
what ctty values of -1 or -2 actually mean.  The CVS log entry from 2012
isn't enlightening either:

  On second thought, in the spirit of keeping things kludgy, set ctty to
  -2 here as a special flag ...

Would you mind to introduce speaking symbolic values for them and add
some comments to make them more transparent?

Also, given this was a "kludge" from 10 years ago, is it really still
needed?

As I said, it's confusing :}


Thanks,
Corinna

Reply via email to