From: George W. <geo...@gm...> - 2007-06-21 04:16:05
|
Hi, I am having trouble using fork() in my VFS application. Hopefully, someone can pinpoint what I am doing wrong... Basically, whenever my VFS app gets a new 'file open' call on a file, it spawns a new process (via fork() ). This process handles the subsequent file operations on that file descriptor (read,write,close,etc.) It seems to work, but unfortunately the parent process sometimes intercepts the subsequent file request, which is intended for the child process. My theory is that both parent and child are sharing the "communication pipe" from the FUSE kernel driver, and so its a race condition. If this is the case, would it possible to duplicate and isolate that "communication pipe" after a fork() for the child only? Note: I still want the parent process to live after the fork(). Thanx in advance! |