tasn pushed a commit to branch enlightenment-0.17.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=09bff77be74bb34565a23cf440f76d35b3291f04

commit 09bff77be74bb34565a23cf440f76d35b3291f04
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Nov 5 15:50:23 2013 +0000

    wsod: Fixed gdb hangs when generating backtraces.
    
    After a long and hard battle with the gods of bugs I finally fixed
    this stupid hang. I had to dig into the gdb source code, and gdb the
    hell out of gdb, but it's now solved.
    
    First of all, we should call gdb with -batch which exits automatically.
    This however is not enough to fix it. The bug was that gdb was haning
    while trying to set attributes on stdin because it was waiting for input.
    This is obviously problematic when running in non-interactive mode, so
    I had to pipe /dev/zero to stdin to fix it.
    While at it, I also fixed the piping of stdout and stderr to be nicer.
    
    Conflicts:
        ChangeLog
        NEWS
        src/bin/e_sys_main.c
---
 ChangeLog            | 4 +++-
 NEWS                 | 1 +
 src/bin/e_sys_main.c | 9 +++++----
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f989802..4d587ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
-2013-10-14 Eduardo Lima (Etrunko)
+2013-11-05 Tom Hacohen
+       * wsod: Fixed gdb hangs when generating backtraces.
 
+2013-10-14 Eduardo Lima (Etrunko)
         * 0.17.5 release
 
 2013-10-14 Mike Blumenkrantz
diff --git a/NEWS b/NEWS
index 3a94e6a..b5347a5 100644
--- a/NEWS
+++ b/NEWS
@@ -146,3 +146,4 @@ Fixes:
     * fixed bug where e widgets would not unset focus
     * fixed bug with filemanager setting path with too many spaces when opened 
from menu
     * fix remember size/position apply
+    * wsod: Fixed gdb hangs when generating backtraces.
diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c
index b5e412c..f4a4332 100644
--- a/src/bin/e_sys_main.c
+++ b/src/bin/e_sys_main.c
@@ -161,10 +161,11 @@ main(int argc,
 
        snprintf(buffer, 4096,
                  "%s --pid=%i "
-                "-ex 'set logging file %s' "
-                "-ex 'set logging on' "
-                "-ex 'thread apply all backtrace full' "
-                "-ex detach -ex quit > /dev/null 2> /dev/null",
+                 "-batch "
+                 "-ex 'set logging file %s' "
+                 "-ex 'set logging on' "
+                 "-ex 'thread apply all backtrace full' "
+                 "-ex detach &> /dev/null < /dev/zero",
                  cmd,
                 pid,
                 output ?: "e-output.txt");

-- 


Reply via email to