Skip site navigation (1)Skip section navigation (2)
Date:      Wed,  3 Jun 98 13:19:58 -0400
From:      Barry Lustig <barry@lustig.com>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Code Logic Question in 2.2 RELENG
Message-ID:  <19980603171959.17140.qmail@devious.lustig.com>

next in thread | raw e-mail | index | archive | help
  Does it make sense to have portmap fail when svc_run returns or would it  
make more sense to try and recover and restart the loop?  I've had portmap  
abort a few times now, and the only easy remedy is a reboot of the machine.   
If I try and restart portmap, I have to find all of the programs that  
registered with it and restart them.  Any suggestions?  By the way, this is  
from RELENG_2_2 cvsupped yesterday.

Thanks,

barry


This is from portmap.c:

        /* additional initializations */
        check_startup();
        (void)signal(SIGCHLD, reap);
        svc_run();
        syslog(LOG_ERR, "svc_run returned unexpectedly");
        abort();


This is from svc_run.c in libc:
void
svc_run()
{
#ifdef FD_SETSIZE
        fd_set readfds;
#else
      int readfds;
#endif /* def FD_SETSIZE */

        for (;;) {
#ifdef FD_SETSIZE
                readfds = svc_fdset;
#else
                readfds = svc_fds;
#endif /* def FD_SETSIZE */
                switch (select(_rpc_dtablesize(), &readfds, NULL, NULL,
                               (struct timeval *)0)) {
                case -1:
                        if (errno == EINTR) {
                                continue;
                        }
                        perror("svc_run: - select failed");
                        return;
                case 0:
                        continue;
                default:
                        svc_getreqset(&readfds);
                }
        }
}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980603171959.17140.qmail>