Linux equivalent of I_PUSH

TIOCPKT is exactly what you want, according to the tty_ioctl(4) man page: the argument is a pointer to an integer which is non-zero to enable packet mode, or zero to disable it.

“inappropriate ioctl for device”

Most likely it means that the open didn’t fail. When Perl opens a file, it checks whether or not the file is a TTY (so that it can answer the -T $fh filetest operator) by issuing the TCGETS ioctl against it. If the file is a regular file and not a tty, the ioctl fails and sets errno to ENOTTY (string value: … Read more

“inappropriate ioctl for device”

Most likely it means that the open didn’t fail. When Perl opens a file, it checks whether or not the file is a TTY (so that it can answer the -T $fh filetest operator) by issuing the TCGETS ioctl against it. If the file is a regular file and not a tty, the ioctl fails and sets errno to ENOTTY (string value: … Read more