dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.23k stars 666 forks source link

Stdout not working anymore after fuse_main invocation #1209

Closed Jakz closed 3 months ago

Jakz commented 5 months ago

Environment

Check List

Description

I'm not sure this is intended behavior or if I'm missing something obvious but I'm trying to implement my own FUSE to provide custom behavior. To do this I need to debug a lof of interactions which is done with std::cout or printf but neither of them are working after fuse_main. My application is currently a console application and I'm running it through MSVC2022.

It looks like fuse_mainis doing something which prevents any output from reaching stdout. I thought it could be an issue of which thread is actually calling the out function (since I have them in the fuse_operations callback) but I'm not able to print anything even from main thread (I tried with a non-blocking fuse_main and a string buffer to pass messages between threads).

Liryna commented 5 months ago

Have you tried with -f ? Otherwise the instance is detach from the console https://github.com/dokan-dev/dokany/blob/69e3d88c693da08fc1e9c540c162877880eac155/dokan_fuse/src/fuse_helpers.c#L46 https://github.com/dokan-dev/dokany/blob/69e3d88c693da08fc1e9c540c162877880eac155/dokan_fuse/src/fuse_helpers.c#L185-L204

Liryna commented 3 months ago

Closing for inactivity