GNOME Bugzilla – Bug 643880
gsm-process-helper: Give useful error data
Last modified: 2011-03-09 15:48:41 UTC
In order for engineers to be able to extract why a tool like gnome-session-check-accelerated failed, we should print something to ~/.xsession-errors. gsm_process_helper() only returned the exit code, unless the process was killed by a signal, in which case it returned -1. However the only consumer of the code never checked the exit code, just success. So fix this by having gsm_process_helper return a normal gboolean/GError pair. As part of this, clean up the code so that it also handles the WIFSIGNALED and WIFSTOPPED cases (See "man 2 waitpid"). Also, the exit_child_simple() function was lame; we don't need to call g_spawn_close_pid() on Unix, so don't do it.
Created attachment 182490 [details] [review] gsm-process-helper: Give useful error data
+ session_runnable = (gsm_process_helper (value, GSM_RUNNABLE_HELPER_TIMEOUT, &error) == 0); That should be == TRUE now, right ? or just gsm_process_helper (), without any comparisons, since the return value is a boolean. Other than that, looks great to me