Il giorno lun, 21/01/2008 alle 00.38 -0500, Rich Rattanni ha scritto: > All: > Here is my situation, I have a program using direct FB and fusionsound > that occasionally spawns a child. If the parent dies, I cannot > re-execute the parent process without first killing the child. > Reviewing the open file descriptors of the child reveals that it is > inheriting the file '/dev/snd/pcm_something'. When I execute the > parent without first killing the child, I get the error > "fs_core_create General Failure". I am wondering if the inherited > file is the source of the problem, or is the child inheriting some > part of the fusion memory pool? Basically I am wondering if finding > the point at which '/dev/snd/pcm_something' is opened and containing > it within my processes with a FD_CLOEXEC flag would solve this > problem? If so, if anyone knows the exact point where this occurs > that would be helpful.
I have just added a fcntl(F_SETFD, FD_CLOEXEC) to the drivers; however this is only useful if your child exec() something. An alternative solution could be a pthread_atfork() that closes the file descriptor in the child process, but I think this won't work with the ALSA driver because snd_pcm_close() actually shuts down the device, thus making it unusable from the parent process. _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
