Re: ejecting CD in a program....
On Fri, 2006-06-09 at 23:17 +0100, Digby Tarvin wrote:
> Anyone know the reason for this mysterious behaviour?:
> I am writing a little application which has to wait for a CD to be
> loaded into the drive, obtain some data from the CD, and then eject
> it ready for the next one....
> What I have found is that if there is initially no CD in the drive,
> the program waits successfully, but fails to eject. If there is an
> initial CD in the drive it does not need to wait, and the eject
> With a little trial and error, I have found that closing and re-opening
> the device before the eject can solve the problem, but ONLY with a
> sleep between close and open.
> If I leave the device open, then no amount of sleeping before the
> eject will help...
No solution here, but maybe you could check out the source of the
command "eject"? This works pretty good, so maybe you find some clues in
Philippe De Ryck