[Xfce4-commits] <xfce4-session:master> Drop the sync code because it can segfault on ext2 (bug #7887).

Nick Schermer noreply at xfce.org
Fri Apr 13 23:56:03 CEST 2012


Updating branch refs/heads/master
         to b04c3a211c8da7e788c52c772d9d713e2aa9233a (commit)
       from 597a19ad0af55978b2d98cb94874901921ffb5dd (commit)

commit b04c3a211c8da7e788c52c772d9d713e2aa9233a
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Apr 13 23:54:06 2012 +0200

    Drop the sync code because it can segfault on ext2 (bug #7887).

 xfce4-session/xfsm-manager.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
index d457eca..bf6a446 100644
--- a/xfce4-session/xfsm-manager.c
+++ b/xfce4-session/xfsm-manager.c
@@ -1137,26 +1137,6 @@ xfsm_manager_save_yourself_global (XfsmManager     *manager,
           return;
         }
     }
-#if defined(__NR_ioprio_set) && defined(HAVE_SYNC)
-  /* if we're on Linux and have ioprio_set(), we start sync()ing the
-   * disks now, and set the i/o priority to idle so we don't create
-   * a poor user experience if any apps need to interact with the user
-   * during shutdown.  if we *don't* have ioprio_set(), we sync at the
-   * end of shutdown, right before quitting.
-   */
-  if (shutdown == TRUE && fork () == 0)
-    {
-#ifdef HAVE_SETSID
-      setsid ();
-#endif
-      if(!syscall (__NR_ioprio_set, IOPRIO_WHO_PROCESS, getpid (),
-                   IOPRIO_PRIO_VALUE (IOPRIO_CLASS_IDLE, 0)))
-        {
-          sync ();
-        }
-      _exit (EXIT_SUCCESS);
-    }
-#endif
 
   if (!shutdown || shutdown_save)
     {


More information about the Xfce4-commits mailing list