diff options
Diffstat (limited to 'daemon.c')
-rw-r--r-- | daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -466,8 +466,14 @@ static int socksetup(int port, int **socklist_p) return 0; } + if (listen(sockfd, 5) < 0) { + close(sockfd); + return 0; + } + *socklist_p = xmalloc(sizeof(int)); **socklist_p = sockfd; + return 1; } #endif |