Are your tired of those nasty messages telling you can’t umount /mnt/cdrom?
Well here goes a little trick…
lsof | grep /mnt/cdrom
This will output the process(es) that are using the device. Now stop or kill the process and you are done.
There are another approach to this question, but let’s see if you have ideas on this…
You also could try something like this…
which will list each account, PID, etc using the device mounted on /mnt/cdrom.
This will also do the trick: