diff options
author | Brian Tarricone <brian@tarricone.org> | 2009-06-04 09:34:55 +0000 |
---|---|---|
committer | Brian Tarricone <brian@tarricone.org> | 2009-06-04 09:34:55 +0000 |
commit | ea909585848ffdeca3f102bc669fd7cb9c9ac715 (patch) | |
tree | 6aaf665a5efbc07af1a5b93fe634553588c76237 | |
parent | 85834ce7cac8924f9ecb6314ccddd80424fd10a1 (diff) | |
download | xfce4-session-ea909585848ffdeca3f102bc669fd7cb9c9ac715.tar.gz |
* xfce4-session/xfsm-global.c: Add timing information to verbose
log printouts.
* xfce4-session/xfsm-{manager,startup}.c: Fix a couple warnings.
(Old svn revision: 29993)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | xfce4-session/xfsm-global.c | 4 | ||||
-rw-r--r-- | xfce4-session/xfsm-manager.c | 3 | ||||
-rw-r--r-- | xfce4-session/xfsm-startup.c | 6 |
4 files changed, 17 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2009-06-04 Brian Tarricone <bjt23@cornell.edu> + + * xfce4-session/xfsm-global.c: Add timing information to verbose + log printouts. + * xfce4-session/xfsm-{manager,startup}.c: Fix a couple warnings. + 2009-04-15 Stephan Arts <stephan@xfce.org> * == Released 4.6.1 === diff --git a/xfce4-session/xfsm-global.c b/xfce4-session/xfsm-global.c index 944ff6c3..9d6a4341 100644 --- a/xfce4-session/xfsm-global.c +++ b/xfce4-session/xfsm-global.c @@ -79,6 +79,7 @@ xfsm_verbose_real (const gchar *format, ...) static FILE *fp = NULL; gchar *logfile; va_list valist; + GTimeVal tv; if (G_UNLIKELY (fp == NULL)) { @@ -86,6 +87,9 @@ xfsm_verbose_real (const gchar *format, ...) fp = fopen (logfile, "w"); g_free (logfile); } + + g_get_current_time(&tv); + fprintf(fp, "[%10lu] ", tv.tv_sec); va_start (valist, format); vfprintf (fp, format, valist); diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c index 7bc81f27..249e2175 100644 --- a/xfce4-session/xfsm-manager.c +++ b/xfce4-session/xfsm-manager.c @@ -1625,7 +1625,8 @@ xfsm_manager_store_session (XfsmManager *manager) { backup = g_strconcat (manager->session_file, ".bak", NULL); unlink (backup); - link (manager->session_file, backup); + if (link (manager->session_file, backup)) + g_warning ("Failed to create session file backup"); g_free (backup); } diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c index 2ead0831..23dfec17 100644 --- a/xfce4-session/xfsm-startup.c +++ b/xfce4-session/xfsm-startup.c @@ -388,6 +388,7 @@ xfsm_startup_autostart_xdg (void) terminal = xfce_rc_read_bool_entry (rc, "Terminal", FALSE); /* try to launch the command */ + xfsm_verbose ("Autostart: running command \"%s\"\n", exec); if (!xfce_exec (exec, terminal, startup_notify, &error)) { g_warning ("Unable to launch \"%s\" (specified by %s): %s", exec, files[n], error->message); @@ -519,7 +520,10 @@ xfsm_startup_start_properties (XfsmProperties *properties, { /* execute the application here */ if (properties->current_directory) - chdir (properties->current_directory); + { + if (chdir (properties->current_directory)) + g_warning ("Unable to chdir to \"%s\": %s", properties->current_directory, strerror (errno)); + } execvp (argv[0], argv); _exit (127); } |