Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Bizarre Proc::Daemon error

by parv (Parson)
on Jun 09, 2014 at 22:27 UTC ( [id://1089354]=note: print w/replies, xml ) Need Help??


in reply to Bizarre Proc::Daemon error

At the risk of stating the obvious, the isa() test failed as no Proc::Daemon object was returned by Proc::Daemon::Init() call, which in turn had failed, as OP found later (thanks for the update), while changing of user id.

ref test might have been added in 0.10 before eval{ isa() }. You may be using a version around there. (Somebody please give me a clue if it is possible to browse older versions code on MetaCPAN (as it is(or was?) possible on search.cpan).)

Replies are listed 'Best First'.
Re^2: Bizarre Proc::Daemon error # Older versions code on MetaCPAN
by LanX (Saint) on Jun 10, 2014 at 02:53 UTC
    > (Somebody please give me a clue if it is possible to browse older versions code on MetaCPAN (as it is(or was?) possible on search.cpan).)

    Yes! Click Release Info then you'll find a drop down named Jump to version.

    HTH! :)

    Cheers Rolf

    (addicted to the Perl Programming Language)

      Thanks much, LanX; ITH.

Re^2: Bizarre Proc::Daemon error
by xtpu2 (Acolyte) on Jun 10, 2014 at 01:39 UTC

    I'm using Proc::Daemon version 0.14.

    Do you have any ideas why the uid change is causing this failure? I guess I can always work around this problem by starting the script with sudo user, but I like getting things working the way they're supposed to...

    Actually, I don't even know if sudo user will work. Could it be that the problem is something about the user I'm trying to use?

      Proc::Daemon calls &POSIX::setuid but does not check if the call has failed. Try yourself as root (or, via sudo) the user id change ...

      perl -MPOSIX=setuid -e ' sub show { printf qq[%s: real: %d, effective: %d\n] , $_[0] , $< , $ +> } show( q[current] ); $id = 65535; # Change to the desired value. setuid( $id ) or die qq[cannot change to $id: $!]; show( q[post-change] ) '

      ... also check setuid system call documentation for your system.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1089354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-20 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found