CD Eject Interrupt - Possible?

117 Views Asked by At

This may seem absurd and it surely is, but I have my reasons.

Running "eject -T" will open/close the CD tray. But the subsequent iterations of the command automatically wait until the tray has physically completed the function (completely closed/opened).

My question... is there a way to interrupt this and process the next command? For example, lets open the tray for about 300ms then close it.

I don't mind using other languages to do this, but can anyone send me in the right direction? Tech docs? etc...

Thanks!

1

There are 1 best solutions below

0
On

I looked at the source for "eject", it calls ioctl. So it looks impossible to me from that level. I'm unfamiliar with ioctl code, but I believe it doesn't do anything also that would allow you to interrupt it. The only alternative I can think of would be writing a new CD driver... but even then there's a chance that it's not possible. You'll have to dig deep in the kernels of Linux to find a way.