chiark / gitweb /
Internal code review complete.
[userv.git] / overlord.c
index be2553ae019155adae0a61d32bfb7c0ddfa79636..7f66c4ea354307512365fc9f1cdaf7e7fcaf96d4 100644 (file)
@@ -130,7 +130,7 @@ int main(int argc, char *const *argv) {
   checkstalepipes();
 
   mfd= socket(AF_UNIX,SOCK_STREAM,0);
-  if (!mfd) { syslog(LOG_CRIT,"cannot create master socket: %m"); exit(4); }
+  if (mfd<0) { syslog(LOG_CRIT,"cannot create master socket: %m"); exit(4); }
 
   assert(sizeof(ssockname.sun_path) > sizeof(RENDEZVOUS));
   ssockname.sun_family= AF_UNIX;
@@ -156,7 +156,7 @@ int main(int argc, char *const *argv) {
     if (sfd<0) {
       errno= e;
       if (errno == EINTR) continue;
-      if (errno == ENOMEM) {
+      if (errno == ENOMEM || errno == EPROTO || errno == EAGAIN) {
         syslog(LOG_ERR,"unable to accept connection: %m");
        continue;
       } else {