mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
dll: fuse: only use the environment's malloc prior to fsp_fuse_loop
- this allows an environment like Cygwin to safely call fork prior to fuse_loop/fuse_loop_mt
This commit is contained in:
@ -229,7 +229,6 @@ struct fsp_fuse_env
|
||||
};
|
||||
|
||||
FSP_FUSE_API void fsp_fuse_signal_handler(int sig);
|
||||
FSP_FUSE_API void fsp_fuse_set_signal_arg(void *se);
|
||||
|
||||
#if defined(_WIN64) || defined(_WIN32)
|
||||
|
||||
@ -304,13 +303,8 @@ static inline int fsp_fuse_set_signal_handlers(void *se)
|
||||
if (0 != pthread_sigmask(SIG_BLOCK, &sigmask, 0))
|
||||
return -1;
|
||||
|
||||
fsp_fuse_set_signal_arg(se);
|
||||
|
||||
if (0 != pthread_create(&sigthr, 0, fsp_fuse_signal_thread, &sigmask))
|
||||
{
|
||||
fsp_fuse_set_signal_arg(0);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -321,8 +315,6 @@ static inline int fsp_fuse_set_signal_handlers(void *se)
|
||||
pthread_join(sigthr, 0);
|
||||
sigthr = 0;
|
||||
|
||||
fsp_fuse_set_signal_arg(0);
|
||||
|
||||
if (0 != pthread_sigmask(SIG_UNBLOCK, &sigmask, 0))
|
||||
return -1;
|
||||
sigemptyset(&sigmask);
|
||||
|
@ -931,10 +931,19 @@ typedef struct _FSP_SERVICE
|
||||
* @return
|
||||
* Service process exit code.
|
||||
*/
|
||||
FSP_API ULONG FspServiceRun(PWSTR ServiceName,
|
||||
FSP_API ULONG FspServiceRunEx(PWSTR ServiceName,
|
||||
FSP_SERVICE_START *OnStart,
|
||||
FSP_SERVICE_STOP *OnStop,
|
||||
FSP_SERVICE_CONTROL *OnControl);
|
||||
FSP_SERVICE_CONTROL *OnControl,
|
||||
PVOID UserContext);
|
||||
static inline
|
||||
ULONG FspServiceRun(PWSTR ServiceName,
|
||||
FSP_SERVICE_START *OnStart,
|
||||
FSP_SERVICE_STOP *OnStop,
|
||||
FSP_SERVICE_CONTROL *OnControl)
|
||||
{
|
||||
return FspServiceRunEx(ServiceName, OnStart, OnStop, OnControl, 0);
|
||||
}
|
||||
/**
|
||||
* Create a service object.
|
||||
*
|
||||
|
Reference in New Issue
Block a user