FreeRDP/client/common
Pascal Nowack 8fc7062605 client/cliprdr_file: Do not deadlock with FUSE2 when stopping fuse loop
FUSE2 has compared to FUSE3 a rather complicated structure with respect
to the FUSE loop, as it uses two handles for the loop and the mount.
Due to needing the possibility to invalidate inodes during the session
and to exit the FUSE session, the session and channel handles need to be
kept alive.
When the session stops, and with that the FUSE session too, the FUSE
thread must still be able to unmount the FUSE mount.
But due to FUSE2's annoying structure, the FUSE session must be
destroyed before doing this.
In this time period, where the FUSE2 loop stops running and between
stopping the FUSE2 session, it cannot answer any requests.
As a result, the "path test", where the mount path is poked cannot be
performed.
This "path test" is however necessary to ensure, that the FUSE loop
exits.
So, the main thread pokes at the FUSE mount to ensure the loop
definitely exits to then signal the FUSE thread, that it can destroy the
session and channel object.
But at the same time, the FUSE loop may already exited and wait for the
main thread to be signalled, that it can destroy the session and channel
object.
The waiting conditions here cannot be satisfied, leading to a deadlock.

Fix this situation, by already signalling the FUSE thread, that it can
destroy the FUSE objects, after calling fuse_session_exit.
2023-08-04 11:08:01 +02:00
..
test [standard] replace __FUNCTION__ with __func__ 2023-07-27 20:02:43 +02:00
client_cliprdr_file.c client/cliprdr_file: Do not deadlock with FUSE2 when stopping fuse loop 2023-08-04 11:08:01 +02:00
client_rails.c Moved rail application start to client common 2022-02-22 16:43:21 +01:00
client.c [client,common] Fix minor code errors 2023-08-03 17:55:49 +02:00
CMakeLists.txt Export interface include directories 2023-08-01 11:12:46 +02:00
cmdline.c [client,common] do not swap drive name,path for wildcards 2023-07-31 10:12:23 +02:00
cmdline.h [client,cmdline] add options for /list: 2023-07-20 22:08:27 +02:00
file.c [client,common] fix leak in rdp parser 2023-07-26 20:26:59 +02:00
geometry.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
smartcard_cli.c [client,common] print smartcard list info 2023-05-12 08:06:45 +02:00