ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/src/fileio.c
(Generate patch)

Comparing ircd-hybrid-8/src/fileio.c (file contents):
Revision 1306 by michael, Sat Oct 1 07:54:24 2011 UTC vs.
Revision 1307 by michael, Sat Mar 24 09:33:33 2012 UTC

# Line 232 | Line 232 | fbputs(const char *str, FBFILE *fb, size
232  
233    return n;
234   }
235
236 int
237 save_spare_fd(const char *spare_purpose)
238 {
239  int spare_fd = open(PATH_DEVNULL, O_RDONLY, 0);
240
241  if (spare_fd < 0)
242  {
243    ilog(LOG_TYPE_IRCD, "Failed to reserve low fd for %s - open failed", spare_purpose);
244    return -1;
245  }
246  else if (spare_fd > 255)
247  {
248    ilog(LOG_TYPE_IRCD, "Failed to reserve low fd for %s - too high", spare_purpose);
249    close(spare_fd);
250    return -1;
251  }
252
253  return spare_fd;
254 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines