in reply to Re: Bizarre Proc::Daemon error
in thread Bizarre Proc::Daemon error

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?

Replies are listed 'Best First'.
Re^3: Bizarre Proc::Dachanges the emon error
by Anonymous Monk on Jun 10, 2014 at 10:57 UTC

    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.