http://www.perlmonks.org?node_id=1116728


in reply to Re^5: How to find perl line after segfault.
in thread How to find perl line after segfault.

Ok, maybe that's it.

Actually, I notice now that CallTrace outputs to STDERR not STDOUT, so it wouldn't work for that reason either.

Thanks for your help.

  • Comment on Re^6: How to find perl line after segfault.

Replies are listed 'Best First'.
Re^7: How to find perl line after segfault.
by BrowserUk (Patriarch) on Feb 14, 2015 at 21:14 UTC

    As you're sending the output to a file, why not just?:

    system q[perl -d:CallTrace i-Mage.pl 2> trace.txt];

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

      Well I shall probably have to do that, But then when it segfaults I wont be able to manage the crash, It'll just be a case of restarting the application. I suppose since I have a crash file (the trace.txt), I can look for trace.txt files at the startup of a programme and then do whatever I need to.

      Regards

      Steve.

        But then when it segfaults I wont be able to manage the crash,

        It would be no different if you used open3(). That also starts a separate process over which you would have no control.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
        In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked