make gvfs-hal-volume-monitor aware of a SIG_HUP that full reloads itsself using execvp
this is done by /libexec/devpubd-hooks/03-hal when discover another /dev/sd* device
This commit is contained in:
parent
212e8cea35
commit
ac9d959309
|
@ -0,0 +1,14 @@
|
|||
$NetBSD$
|
||||
|
||||
--- client/gvfsfusedaemon.c.orig 2017-03-28 14:05:33.000000000 +0000
|
||||
+++ client/gvfsfusedaemon.c
|
||||
@@ -2443,7 +2443,9 @@ vfs_init (struct fuse_conn_info *conn)
|
||||
subthread = g_thread_new ("gvfs-fuse-sub", (GThreadFunc) subthread_main, NULL);
|
||||
|
||||
/* Indicate O_TRUNC support for open() */
|
||||
+#ifdef FUSE_CAP_ATOMIC_O_TRUNC
|
||||
conn->want |= FUSE_CAP_ATOMIC_O_TRUNC;
|
||||
+#endif
|
||||
|
||||
/* Prevent out-of-order readahead */
|
||||
conn->async_read = 0;
|
|
@ -1,6 +1,6 @@
|
|||
$NetBSD$
|
||||
|
||||
--- configure.ac.orig 2020-09-18 13:48:24.766400687 +0000
|
||||
--- configure.ac.orig 2017-03-28 14:05:33.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -823,7 +823,7 @@ AC_CHECK_MEMBERS([struct statvfs.f_baset
|
||||
dnl
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
$NetBSD$
|
||||
|
||||
--- monitor/hal/hal-volume-monitor-daemon.c.orig 2020-09-28 23:58:08.642966101 +0000
|
||||
+++ monitor/hal/hal-volume-monitor-daemon.c
|
||||
@@ -27,14 +27,33 @@
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gmodule.h>
|
||||
#include <gio/gio.h>
|
||||
+#include <signal.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include <gvfsproxyvolumemonitordaemon.h>
|
||||
|
||||
#include "ghalvolumemonitor.h"
|
||||
|
||||
+static char **saveargs;
|
||||
+
|
||||
+static void reset(int s) {
|
||||
+ sigset_t set;
|
||||
+
|
||||
+ sigemptyset(&set);
|
||||
+ sigaddset(&set,SIGHUP);
|
||||
+ sigprocmask(SIG_UNBLOCK,&set,NULL);
|
||||
+ execvp(saveargs[0],saveargs);
|
||||
+}
|
||||
+
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
+
|
||||
+ if (signal(SIGHUP, reset) == SIG_ERR) {
|
||||
+ perror ("SIGHUP");
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ saveargs=argv;
|
||||
g_vfs_proxy_volume_monitor_daemon_init ();
|
||||
return g_vfs_proxy_volume_monitor_daemon_main (argc,
|
||||
argv,
|
Loading…
Reference in New Issue