in reply to How do I stop/debug/trace segmentation faults? (Moved from Q&A)

Hmm, this is just off the top of my head, but how about replacing the line in your crontab with one that does
yes "s" | perl -d (your script here) > logfile

--
Ryan Koppenhaver, Aspiring Perl Hacker
"I ask for so little. Just fear me, love me, do as I say and I will be your slave."

  • Comment on Re: How do I stop/debug/trace segmentation faults? (Moved from Q&A)
  • Download Code

Replies are listed 'Best First'.
Re: Re: How do I stop/debug/trace segmentation faults? (Moved from Q&A)
by BlueLines (Hermit) on Dec 08, 2000 at 05:17 UTC
    Actually, you wouldn't want to do that, as the logfile would be written over every time the cronjob ran. You'd probably want to do something liike this:

    date >> logfile && perl -d (your script here) 2>&1 >> logfile

    The >> will append to the logfile rather than overwrite it, and the 2>&1 redirects stderr to stdout, assuming you are running bash. I'm not sure of the syntax for tcsh/ksh/csh/etc, but i'm pretty sure that there will be more useful debugging info in stderr than in stdout.

    BlueLines

    Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.