“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 … Read more

Beep on Linux in C

Please look at the standard linux beep source code. http://www.johnath.com/beep/beep.c It uses KIOCSOUND ioctl to “beep”, but you don’t need superuser privileges to make it play. I have configured it to be readable and executable by users on the “beep” group. So my standard user with UID 1000 is in the group with GID 501 … Read more