glibc backtrace - can't redirect output to file

前端 未结 2 1659
陌清茗
陌清茗 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 17:58

    The mailing list that Jason references also suggests some more heavy-duty solutions, as follows:

    IMHO koji (and mock for that matter) ought to be running the builds inside a captive pty whose output it logs anyway, even if they redirect everything. You never know what crazy nonsense some package is going to try. (Roland McGrath, http://www.redhat.com/archives/rhl-devel-list/2009-August/msg00982.html)

    Following posts suggest using the pty python package to accomplish this.

    0 讨论(0)
  • 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...

    0 讨论(0)
提交回复
热议问题