This is what happens on current/amd64:

# mount /dev/cd0a /mnt
# cdio eject    # nothing happens
# echo $?
0

cdio(1) does not eject the CD, as it is currently mounted;
neither does it say anything about it, and returns 0.

However, somebody somehow "remembers" the pending eject,
and once the device is unmounted, the CD ejects.

# umount /mnt   # CD ejects

Is this expected? Is it documented? The manpage doesn't
mention this (cool) behaviour, and cdio.c doesn't seem
to do anything special about waiting for an umount.

Does this depend on support from the hardware
(the CD drive remembering the eject request)?

Is this something general (a device event
waiting for some other device event)?

        Jan


--- cdio.1.orig Sat Jun 18 14:47:33 2011
+++ cdio.1      Sat Jun 18 14:48:17 2011
@@ -131,6 +131,8 @@
 and restarting with a different device.
 .It Ic eject
 Eject the disc.
+If the disc is currently mounted,
+the eject will be postponed until umount.
 .It Ic exit
 A synonym for
 .Ic quit .

Reply via email to