You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to use HFuse for a hit-and-run-scenario: my application should mount the virtual FS, execute an external shell command (using callCommand) that uses that FS, unmount the FS.
It seems the fuseRunInline was made for that, where I pass the callCommand bit into the 3rd parameter (act). 1st and 2nd parameter (register and unregister) are "optional" in that I can just pass pure (), right? So like this
main :: IO ()
main = do
fuseRunInline
(\fd op -> pure ())
(\x -> pure())
(\s -> threadDelay 20000000)
"hellofs" ["/home/user/tmp"]
helloFSOps
defaultExceptionHandler
except instead of the callCommand bit I put in a 20 sec delay as a placeholder, the actual command will come later.
If I run this (with ghc-options -threaded and -with-rtsopts=-N10 then it mounts, waits 20 second and unmounts just fine. I can verify the mound using the mount unix command during those 20 seconds. But during those 20 seconds I cannot e.g. list the contents of the virtual FS, i.e. `ls -l /home/user/tmp'. That blocks until the 20 seconds are over and then fails with an error message.
The text was updated successfully, but these errors were encountered:
@hankfire Did you ever get this to work? I have a use case that is identical to the one you describe (mount fs and run external command), but I have no luck either.
Hi I am trying to use HFuse for a hit-and-run-scenario: my application should mount the virtual FS, execute an external shell command (using
callCommand
) that uses that FS, unmount the FS.It seems the
fuseRunInline
was made for that, where I pass thecallCommand
bit into the 3rd parameter (act
). 1st and 2nd parameter (register
andunregister
) are "optional" in that I can just passpure ()
, right? So like thisexcept instead of the
callCommand
bit I put in a 20 sec delay as a placeholder, the actual command will come later.If I run this (with ghc-options
-threaded
and-with-rtsopts=-N10
then it mounts, waits 20 second and unmounts just fine. I can verify the mound using themount
unix command during those 20 seconds. But during those 20 seconds I cannot e.g. list the contents of the virtual FS, i.e. `ls -l /home/user/tmp'. That blocks until the 20 seconds are over and then fails with an error message.The text was updated successfully, but these errors were encountered: