YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
/* Never lower the hard limit (rlim_max): lowering is irreversible for
non-privileged users and can prevent later increases. */ if ((ulonglong) rlimit.rlim_max != (ulonglong) RLIM_INFINITY &&
max_file_limit > rlimit.rlim_max)
{ /* Best effort: try raising hard limit only when needed. */
rlimit.rlim_max= max_file_limit;
}
/* Soft limit cannot exceed hard limit. */
rlimit.rlim_cur= max_file_limit;
if (setrlimit(RLIMIT_NOFILE, &rlimit)) {
max_file_limit= old_cur; /* Use original value */
} else
{
rlimit.rlim_cur= 0; /* Safety if next call fails */
(void) getrlimit(RLIMIT_NOFILE,&rlimit);
DBUG_PRINT("info", ("rlim_cur: %u", (uint) rlimit.rlim_cur)); if (rlimit.rlim_cur) /* If call didn't fail */
max_file_limit= (uint) rlimit.rlim_cur;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.