laziness, impatience, and hubris | |
PerlMonks |
Bizarre Proc::Daemon errorby xtpu2 (Acolyte) |
on Jun 09, 2014 at 20:32 UTC ( [id://1089323]=perlquestion: print w/replies, xml ) | Need Help?? |
xtpu2 has asked for the wisdom of the Perl Monks concerning the following question: I'm experiencing a very strange error (strange for my limited experience, anyway) with Proc::Daemon. I have a perl daemon that fails with the error message: Can't call method "isa" on unblessed reference at /usr/local/share/perl/5.14.2/Proc/Daemon.pm line 88, <STDIN> line 3.The line 88 in question from Proc::Daemon is this one: unless ( ref( $self ) && eval{ $self->isa( 'Proc::Daemon' ) } ) {It is located in the "Init" subroutine in Proc::Daemon. The reason that I'm calling this error "bizarre" is because a) Why is the script dying when executing an expression in an eval? Isn't that the whole point of eval? b) This script was working not 2 weeks ago when I was testing it on this same system. During that time there have not been any updates to the Proc::Daemon module or to Perl. Here is the code that calls Proc::Daemon:
I do have a custom DIE signal handler (which I thought might be the cause of the error, but if so, I must not understand something about the way evals work). It looks like this:
Can anybody shed some light on this thing? Edited to Add: Further poking around has narrowed the problem down to the setuid parameter for Proc::Daemon::Init. If I remove it, the script runs fine. However, this means the script is running as root and I would like to avoid that. Investigatining further...
Back to
Seekers of Perl Wisdom
|
|