Combining Syslog and DBI
Saw an interesting interaction today. The Sys::Syslog module makes use of fork to prevent a blocking write to the console. Unfortunately, this means that if you are connected to a database via DBI and try to log anything via syslog, you'll run the issue of the DBI handle being closed under you. Even the DBI property of InactiveDestroy cannot save you b/c of the fork being hidden in Sys::Syslog. Thanks to David E Wheeler for the DBI AutoInactiveDestroy attribute which saves the day!
Leave a comment