Last modified: Thursday, July 02, 2026

Patch for youbind server (youbin-3.5)

youbin3, File Descriptor Table

The Youbin protocol is designed so that, rather than clients polling for incoming email, the server sends push notifications. The youbind server detects changes in the mail spool and notifies clients.

The youbind server included in youbin-3.5 has a bug that causes the file descriptor table to overflow when xyoubin (an xbiff implementation supporting the Youbin protocol) is used as the client. The syslog will display a message such as "open: Too many open files." There is no issue when using xpbiff as the client.

This is a patch to fix this problem.

youbin-3.5-server_c.patch (August 8, 2008)



--- Youbin-Unix/server.c	2003-05-08 12:34:45.000000000 +0900
+++ Youbin-Unix-new/server.c	2008-08-08 13:19:19.837394950 +0900
@@ -49,6 +49,7 @@
 #include <pwd.h>                /* For getpwuid(). */
 #include <signal.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "youbin.h"
 #include "server.h"
@@ -358,8 +359,9 @@
     }
 #endif  
     if( !(sp->mode.head_list) ) {
+      fclose(fi);
       send_packet(buff, sp);        /* Send header and so on. */
-      retrun;
+      return;
     } 
 
     line = buff + strlen(buff);


Atsushi NUNOME @ Computer System Laboratory at Kyoto Institute of Technology (nunome@kit.ac.jp)