At the top of the script, say
I've imported setsid, too, since you need it to manifest a daemon.use POSIX qw/setuid setsid/; BEGIN { setuid scalar getpwnam 'toadi' or die $!; }
After Compline,
Zaxo
In reply to Re: Running a daemon process as another user
by Zaxo
in thread Running a daemon process as another user
by toadi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |