convert tcgetsid to ioctl