Index: gio/gunixmount.c
===================================================================
--- gio/gunixmount.c	(revision 8015)
+++ gio/gunixmount.c	(working copy)
@@ -242,6 +242,7 @@
   GIOChannel *error_channel;
   guint error_channel_source_id;
   GString *error_string;
+  gchar **argv;
 } UnmountEjectOp;
 
 static void 
@@ -276,6 +277,7 @@
   g_source_remove (data->error_channel_source_id);
   g_io_channel_unref (data->error_channel);
   g_string_free (data->error_string, TRUE);
+  g_strfreev (data->argv);
   close (data->error_fd);
   g_spawn_close_pid (pid);
   g_free (data);
@@ -316,27 +318,15 @@
   return TRUE;
 }
 
-static void
-eject_unmount_do (GMount              *mount,
-                  GCancellable        *cancellable,
-                  GAsyncReadyCallback  callback,
-                  gpointer             user_data,
-                  char               **argv)
+static gboolean
+eject_unmount_do_cb (gpointer user_data)
 {
-  GUnixMount *unix_mount = G_UNIX_MOUNT (mount);
-  UnmountEjectOp *data;
+  UnmountEjectOp *data = (UnmountEjectOp *) user_data;
   GPid child_pid;
-  GError *error;
-  
-  data = g_new0 (UnmountEjectOp, 1);
-  data->unix_mount = unix_mount;
-  data->callback = callback;
-  data->user_data = user_data;
-  data->cancellable = cancellable;
-  
-  error = NULL;
+  GError *error = NULL;
+
   if (!g_spawn_async_with_pipes (NULL,         /* working dir */
-                                 argv,
+                                 data->argv,
                                  NULL,         /* envp */
                                  G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_SEARCH_PATH,
                                  NULL,         /* child_setup */
@@ -376,12 +366,40 @@
     if (data->error_channel != NULL)
       g_io_channel_unref (data->error_channel);
 
+    g_strfreev (data->argv);
     g_error_free (error);
     g_free (data);
   }
+
+  return FALSE;
 }
 
 static void
+eject_unmount_do (GMount              *mount,
+                  GCancellable        *cancellable,
+                  GAsyncReadyCallback  callback,
+                  gpointer             user_data,
+                  char               **argv)
+{
+  GUnixMount *unix_mount = G_UNIX_MOUNT (mount);
+  UnmountEjectOp *data;
+
+  data = g_new0 (UnmountEjectOp, 1);
+  data->unix_mount = unix_mount;
+  data->callback = callback;
+  data->user_data = user_data;
+  data->cancellable = cancellable;
+  data->argv = g_strdupv (argv);
+
+  if (unix_mount->volume_monitor != NULL)
+    g_signal_emit_by_name (unix_mount->volume_monitor, "mount-pre-unmount", mount);
+
+  g_signal_emit_by_name (mount, "pre-unmount", 0);
+
+  g_timeout_add (500, (GSourceFunc) eject_unmount_do_cb, data);
+}
+
+static void
 g_unix_mount_unmount (GMount             *mount,
                       GMountUnmountFlags flags,
                       GCancellable        *cancellable,
Index: gio/gmount.c
===================================================================
--- gio/gmount.c	(revision 8015)
+++ gio/gmount.c	(working copy)
@@ -141,6 +141,22 @@
                     NULL, NULL,
                     g_cclosure_marshal_VOID__VOID,
                     G_TYPE_NONE, 0);
+     /**
+      * GMount::pre-unmount:
+      * @mount: the object on which the signal is emitted
+      * 
+      * This signal is emitted when the #GMount is about to be
+      * unmounted. This means
+      *
+      * Since: 2.22.
+      **/
+      g_signal_new (I_("pre-unmount"),
+                    G_TYPE_MOUNT,
+                    G_SIGNAL_RUN_LAST,
+                    G_STRUCT_OFFSET (GMountIface, pre_unmount),
+                    NULL, NULL,
+                    g_cclosure_marshal_VOID__VOID,
+                    G_TYPE_NONE, 0);
 
       initialized = TRUE;
     }
Index: gio/gmount.h
===================================================================
--- gio/gmount.h	(revision 8015)
+++ gio/gmount.h	(working copy)
@@ -126,6 +126,9 @@
                                              gboolean             force_rescan,
                                              GCancellable        *cancellable,
                                              GError             **error);
+
+  /* yet more signals */
+  void        (* pre_unmount)               (GMount              *mount);
 };
 
 GType       g_mount_get_type                  (void) G_GNUC_CONST;
