the daemon that won't die

Colin Brace cb at
Sun Mar 2 13:55:30 UTC 2008

Hi all,

I made the mistake of trying to run greyscanner
<> as a
regular user. Now, everytime it runs (every 30 minutes), there is a
cron error from user "operator" complaining that "you need to be root"
to run /usr/libexec/save-entropy. Moreover, each time this happens, an
instance of greyscanner, belonging to user operator, remains dormant
in memory, which means an additional instance of perl. After a day or
so most of my swap memory is used. up.

I have tried killing every PID associated with user operator and/or
greyscanner, but like Lazarus the thing keeps rising from the dead
every 30 mins. I can't figure out what process is keeping it alive.

FWIW, here is the relevant snippet from the script:

# daemonize and scan in a loop.

while (1) {
    openlog("greytrapper", 'pid', 'mail') || die "can't openlog";
    syslog('debug', "Scan started");
    my $pid;
    $pid = fork();
    if (!$pid) {
        # child. scan away...
    # parent waits and sleeps.
    syslog('debug', "Scan completed");

I am not a perl programmer, and it is not immediately obvious what is
going on here.

So, how to I kill this bugger once and for all?


$ uname -r

  Colin Brace

More information about the freebsd-questions mailing list