Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^7: How to find perl line after segfault.

by BrowserUk (Patriarch)
on Feb 14, 2015 at 21:14 UTC ( #1116730=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^8: How to find perl line after segfault.
by Steve_BZ (Chaplain) on Feb 15, 2015 at 10:09 UTC

    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

        Well, with open3(), I can use waitpid and then read (error); which allows me some control over what happens next, if I just did

        system ("perl -d:CallTrace Foo.pl");

        Wouldn't it just crash? Maybe not, I should probably try it.

        Regards

        Steve.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1116730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2023-03-23 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?