Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: opening the cd rom

by ambrus (Abbot)
on Oct 03, 2004 at 20:10 UTC ( #396052=note: print w/replies, xml ) Need Help??

in reply to opening the cd rom

Forgetting about the web part of the question first, let me note how to open the cdrom from a locally run program, in linux. I show this just because it's not obvious even this way.

{ use Fcntl; sysopen my $f, "/dev/hdc", O_RDONLY|O_NONBLOCK or die "open + $?"; ioctl $f, 0x5309, 0 or die "ioctl $!"; }

The trick here is to use O_NONBLOCK. You have to substitute "/dev/hdc" with the actual cdrom device of course. You can probably find it out with the {set,get,end}fsent C functions, but I don't know how to access those from perl.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://396052]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2022-01-18 15:37 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (53 votes). Check out past polls.