[erlang-questions] ioctl support?
Richard A. O'Keefe
ok@REDACTED
Wed Jun 4 02:44:42 CEST 2008
On 1 Jun 2008, at 1:00 pm, tsuraan wrote:
> I'm trying to determine if my cd-rom drive tray is open. I think the
> only way to do that in Linux is to use the CDROM_DRIVE_STATUS request
> (an ioctl).
CD-ROM trays don't open and close that fast, so presumably checking
once a second or so would be ample. What I'd do would be to write a
separate C program as a C node and have it send {cdrom,opened} and
{cdrom,closed} messages.
More information about the erlang-questions
mailing list