nnrpd.pid

Sven Paulus sven at tin.org
Mon Mar 26 19:31:02 UTC 2001


Bettina Fink wrote in <99nua2$si2$1 at krell.zikzak.de>:
>>> I've looked for a parameter like "-P pid-file" or a switch in a
>>> config file (like innfeed's "pid-file" parameter), but I haven't
>>> found one.

I had the same problem a while ago. My solution was to hack the source in 
nnrpd.c's main() to read like this:


        if (ListenPort != NNTP_PORT)
                sprintf(buff, "nnrpd-%d.pid", ListenPort);
        else
                strcpy(buff, "nnrpd.pid");

        if ((pidfile = fopen(cpcatpath(innconf->pathrun, buff),
                                                "w")) == NULL) {
            syslog(L_ERROR, "cannot write nnrpd.pid %m");
            exit(1);
        }
        fprintf(pidfile,"%d\n", getpid());
        fclose(pidfile);

Maybe this should go into the main tree.

Sven


More information about the inn-workers mailing list