I wanted to document that TIOCSPTLCK here is used to unlock the slave pty with a zero valued ioctl argument. I'll just use a comment.