Hi,
I have following code
run_fule_loop() {
fuse_loop()
}
main() {
fuse_mount()
fuse_new()
pthread_create(run_fule_loop)
access_fuse_filesystem_here();
}
It creates a fuse filesystem and runs fuse_loop in a separate thread.
Parent thread is able to access fuse filesystem and it is served by a
child process. Pay attention that parent thread runs first on
pthread_create() so access_fuse_filesystem_here() function is blocked
until the child thread run fuse_loop().
It works fine on my Linux box (fuse 2.8.1), and fails on macosx 10.6.7
(macfuse from macports). I enabled fuse debug log and what I have:
[ tup ] Executing Commands...
[ 0/3 ] src/tup/CC path.c
Users/anatol/sources/tup: No such file or directory
The tool fails even without any access to fuse filesystem. fuse_loop
is not even started!
I am able to workaround the problem by adding sleep(1) right after the
pthread_create. It blocks parent and lets child to start fuse_loop().
Could anybody explain it - why it fails, why fs access is not blocked
until fuse_loop? Could it be because of the different fuse versions
(macfuse is based on 3 years old libfuse)?
The sleep(1) solution is less then ideal, what is the best way to
"block a thread until fuse filesystem is available"?
--
You received this message because you are subscribed to the Google Groups
"MacFUSE" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/macfuse?hl=en.