glibc backtrace - can't redirect output to file

前端 未结 2 1658
陌清茗
陌清茗 2020-12-17 17:12

I\'m in the process of debugging a C program (that I didn\'t write). I have all of the internal debugging tools (a whole bunch of printf\'s) enabled, and I wrote a small PHP

2条回答
  •  一整个雨季
    2020-12-17 18:00

    Sorry... I asked the question after about half an hour of googling, but after a little more investigation, I found a solution... in a Fedora mailing list post (http://www.redhat.com/archives/rhl-devel-list/2009-August/msg00982.html) dealing with this problem in the Koji build system...

    export LIBC_FATAL_STDERR_=1
    

    Apparently by default the error reports go right to /dev/tty for some reason...

提交回复
热议问题