Add debugging to failure
authorMark Spencer <markster@digium.com>
Fri, 7 May 2004 14:08:50 +0000 (14:08 +0000)
committerMark Spencer <markster@digium.com>
Fri, 7 May 2004 14:08:50 +0000 (14:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2914 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c

index a1c1647..b4a6435 100755 (executable)
@@ -248,7 +248,8 @@ static void *netconsole(void *vconsole)
 
                res = poll(fds, 2, -1);
                if (res < 0) {
-                       ast_log(LOG_WARNING, "poll returned < 0: %s\n", strerror(errno));
+                       if (errno != EINTR)
+                               ast_log(LOG_WARNING, "poll returned < 0: %s\n", strerror(errno));
                        continue;
                }
                if (fds[0].revents) {
@@ -321,7 +322,7 @@ static void *listener(void *unused)
                                        fcntl(consoles[x].p[1], F_SETFL, flags | O_NONBLOCK);
                                        consoles[x].fd = s;
                                        if (pthread_create(&consoles[x].t, &attr, netconsole, &consoles[x])) {
-                                               ast_log(LOG_ERROR, "Unable to spawn thread to handle connection\n");
+                                               ast_log(LOG_ERROR, "Unable to spawn thread to handle connection: %s\n", strerror(errno));
                                                consoles[x].fd = -1;
                                                fdprint(s, "Server failed to spawn thread\n");
                                                close(s);