Linux: FUSE and thread termination

These days, I'm trying to write a file system via FUSE. During the debugging, I found that if I want to use threads with pthread, I need to create my own thread from init function of fuse operations.

If I create thread from main function before I call fuse_main, my thread will be terminated soon after fuse_main function calling.

I saw the FAQ of FUSE and it mentioned all thread should be created from init because when the FUSE process goes to background the threads which was started before fuse_main will be exited. Please see the below references.

References:

댓글

이 블로그의 인기 게시물

Wireless: HotSpot 2.0 이란?

Apple M1 Mac Mini에서 이더리움 (Ethereum) 채굴하기

Java: Java for Game? Java가 Game 개발에 어울릴까?