i'm having this problem with a c++ (with qt) program i'v developed.
I call a system command "mount" to mount a device in my raspberry. Right after when mount process is finished i call "mpc update" to update the music database but a lot of songs are missing. If i call mpc update manualy some seconds right after mpc can find all songs correctly.

So the question is: "how can i be sure that the mount process is correctly ended in order to update mpc with all the songs?"