Forum archive 2000-2006

Jason Edgecombe - infinite loop in feedback.pl when log file is not writable

Jason Edgecombe - infinite loop in feedback.pl when log file is not writable

by Arnold Pizer -
Number of replies: 0
inactiveTopicinfinite loop in feedback.pl when log file is not writable. topic started 11/21/2002; 6:25:43 AM
last post 11/21/2002; 8:52:44 AM
userJason Edgecombe - infinite loop in feedback.pl when log file is not writable.  blueArrow
11/21/2002; 6:25:43 AM (reads: 920, responses: 1)
hi,

I have attached my patch to feedback.pl. the &log function calls &internal error when the log file is not writable. The &internal_error funtion always calls &log, so when the log file is not writable, then an infinite loop occurs.

On line 137 of feedback.pl, I changed &internal_error to "die". There should be a better way to do this, but at least this way, it prevents the infinite loop.

Sincerely, Jason Edgecombe <jwedgeco at uncc.edu>

 

Index: feedback.pl
===================================================================
RCS file: /usr/local/cvsroot/webwork/system/cgi/cgi-scripts/feedback.pl,v
retrieving revision 1.1.1.1
retrieving revision 1.2.2.1
diff -r1.1.1.1 -r1.2.2.1
1c1
< #!/usr/local/bin/webwork-perl



> #!/usr/bin/perl
3c3
< # $Id: feedback.pl,v 1.1.1.1 2002/10/22 17:14:20 jwedgeco Exp $




> # $Id: feedback.pl,v 1.2.2.1 2002/11/21 18:54:51 jwedgeco Exp $
69a70
> $To = $Global::feedbackAddress if ($To eq '');
136c137
< open(LOGFILE, ">> $LOGFILE") || &internal_error("Can't write to $LOGFILE"); # warn("Can't write to $LOGFILE\n");




> open(LOGFILE, ">> $LOGFILE") || die("Can't write to $LOGFILE"); # warn("Can't write to $LOGFILE\n");



<| Post or View Comments |>


userArnold K. Pizer - Re: infinite loop in feedback.pl when log file is not writable.  blueArrow
11/21/2002; 8:52:44 AM (reads: 1145, responses: 0)
Thanks Jason.

This was a known bug in version 1.7 which only caused problems if webwork was set up incorrectly (see http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$787)

It has been fixed in the current version 1.8.

Arnie

<| Post or View Comments |>