Parent Directory
|
Revision Log
|
Patch
revision 1306 by michael, Sat Oct 1 07:54:24 2011 UTC | revision 1307 by michael, Sat Mar 24 09:33:33 2012 UTC | |
---|---|---|
# | Line 232 fbputs(const char *str, FBFILE *fb, size | Line 232 fbputs(const char *str, FBFILE *fb, size |
232 | ||
233 | return n; | return n; |
234 | } | } |
int | ||
save_spare_fd(const char *spare_purpose) | ||
{ | ||
int spare_fd = open(PATH_DEVNULL, O_RDONLY, 0); | ||
if (spare_fd < 0) | ||
{ | ||
ilog(LOG_TYPE_IRCD, "Failed to reserve low fd for %s - open failed", spare_purpose); | ||
return -1; | ||
} | ||
else if (spare_fd > 255) | ||
{ | ||
ilog(LOG_TYPE_IRCD, "Failed to reserve low fd for %s - too high", spare_purpose); | ||
close(spare_fd); | ||
return -1; | ||
} | ||
return spare_fd; | ||
} |
|
svnadmin@ircd-hybrid.org | ViewVC Help |
Powered by ViewVC 1.1.28 |