what might cause a print error in perl?

Posted by Mark J Seger on Server Fault See other posts from Server Fault or by Mark J Seger
Published on 2012-10-19T14:56:26Z Indexed on 2012/10/19 17:04 UTC
Read the original article Hit count: 367

Filed under:

I have a long running script that every hour opens a file, prints to it and closes the file. I've recently found very rarely, the print is failing, not because I'm testing the status of the print itself but rather due to the fact of missing entries in the file until the system is actually rebooted!

I do trap for file open failures and write a message to syslog when that happens and I'm not seeing any open failures so I'm now guessing it may be the print that is failing. I'm not trapping the print failures, which I suspect most people don't but am now going to update that one print.

Meanwhile, my question is does anyone know what types of situations could cause a print statement to fail when there is plenty of disk storage and no contention for a file which has been successfully opened in append mode?

© Server Fault or respective owner

Related posts about perl