in reply to How to umount and eject cdrom on MacOSX from Perl?

Thanks for arriving answers! And is 'umount' utility (non syscall!) at all exists on macosx? Can I call it at least to umount cdrom (and ask user to press the eject button manually)? Can I invoke it like this: system("umount $some_drom_mountpoint"); - is it always in $PATH; do all users have the right to invoke it? Will it succeed if Finder window is opened for CDROM folder?

Replies are listed 'Best First'.
Re^2: How to umount and eject cdrom on MacOSX from Perl?
by eieio (Pilgrim) on Feb 10, 2005 at 14:19 UTC
    I believe that the umount command exists on all versions of Mac OS X. However, it will not unmount a mounted CDROM volume but, rather, returns a "Operation not permitted" error.

    A better solution is the one offered by the AM below, use the drutil command. This command should unmount the mounted CDROM volume and eject the CDROM. It doesn't matter if a Finder window is currently displaying the contents of the CDROM volumes. Read the drutil man page for dealing with multiple CDROM drives.