PDA

View Full Version : Disk deamon handling for xcdroast?


jonte
03-11-2003, 01:19 PM
Hi!

Anyone have some idee on this one. It is a great huzzle to have to switch this on and off in order to use the xcdroast.

the designer of the app:
"My biggest problem is that I have no clue
how to interface correctly with the finder. Stopping the autodiskmount daemon is some bad hack. I would love when someone knows a much nicer way to grab resources in osX.!"

as a comment to ...

"For xcdroast to be able to access a CD (mainly interesting for ripping audio) the CD MAY NOT BE MOUNTED in the Finder. It is therefore necessary to kill the autodiskmount process before inserting an audio-CD (ps -ax | grep autodiskmount | grep -v grep | cut -c2-5 | xargs sudo kill); don't forget to restart autodiskmount, once you're done ripping (sudo /sbin/autodiskmount -av)."

/Best regards

bluehz
03-11-2003, 05:29 PM
Here's what I do with cdrecord / mkisofs..

# find the disk id number
# outputs something like
# /dev/disk1s2s

df


# unmount the disk (do not eject)
# use only the dev id not "/dev/"
disktool -u disk1s2s

# reverse the process to remount the disk
disktool -m disk1s2s

heywood
06-09-2004, 08:27 PM
the latest version of xcdroast (0.98a15) comes with an automated script-like app called "launch X-CD-Roast" that, according to the docs, basically does this:

1. ps -ax | fgrep autodiskmount (gives the pid of the daemon)
2. sudo kill -STOP <pid>
3. (... run X-CD-Roast ...)
4. sudo kill -CONT <pid>

this is necessary to allow X-CD-R to grab any inserted CD(R)s -- otherwise the finder grabs them and X-CD-R never sees them at all.

this works fine for me, but it has a strange and annoying side-effect i'd like to fix. any apps that are already started when i run the launch script continue to work fine after X-CD-R is launched. however, any apps launched *after* the launch script is started HANG until i quit out of X-CD-R. note that it is not necessary to quit out of apple X11 -- only X-CD-R itself.

i tested this a bit and discovered that the "sudo kill -STOP <pid>" command is precisely what causes this. as soon as the daemon is restarted, all those apps that are/were hanging initially finish launching and work without any problems.

so... does anyone have any suggestions about 1) why this is happening and 2) how to do this better than the way described above? the X-CD-R developer has said he tried to learn the proper way to handle inserted CDs from within the app (as opposed to the hack described above), but has so far been unsuccessful. any suggestions would be greatly appreciated.

system details: 15" G4 PowerBook, OS X 10.3.3 (haven't had a chance to grab 10.3.4 just yet), Apple X11 1.0, X-CD-Roast 0.98a15 (http://xcdroast.org/xcdr098/xcdrosX.html).

TIA,

heywood

heywood
06-14-2004, 06:39 PM
1. ps -ax | fgrep autodiskmount (gives the pid of the daemon)


... that should be "diskarbitrationd", not "autodiskmount".

-H