Rough ioctl with support for winsize