I often run a game (under wine) which requires a CD. I have made an ISO image of the CD, and have written a script to mount it and then launch the game.
I would like to unmount the image once I have exited the game. Unfortunately, wine forks a child process to launch the game, and does not wait for it to die before exiting itself. As a result, the unmount section of my script is executed before the game launches.
What can I add to my script that will wait for the wine child process(es) to end?
I am running Ubuntu 10.04, wine-1.3.26.