> But I am getting the following error:
> when I typed cat fd.c
If you use the version 2.2 or above of the interface (as fusexmp distributed
with the latest version of fuse does), open has an additional argument,
with type struct fuse file info *, and in its "fh" field you can store your
handle. A struct of the same type, with the fh field filled with the value
that you provided in open(), will be returned to each read(), write() ecc.
call made from the process which performed the open() call.
However, this will not reuse open files on a per-path basis (which is not
posix-compliant, but you might be interest in doing things that way) - to
do that you have to use an hashtable as you are in fact doing. At this
point, the segfault might be caused by not properly locking the hashtable,
because fuse is multithreaded by default, i.e. there can be a different
thread for each request. Try to use the "-s" option to fusexmp, and see if
the error disappears, or post your code here for more advice.
Please note that I do not read the e-mail address used in the from field but
I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo
vincenzo_ml at yahoo dot it