Как различные ulimit значения для набора процессов? Меня особенно интересует количество открытых файловых дескрипторов. Как это задано для данного процесса? Если он основан на пользователе, который запустил процесс, то как он настроен для пользователя?
Как установить эти ограничения для определенного пользователя?
Это POSIX - см. man 3 sysconf
NAME
sysconf - get configuration information at run time
SYNOPSIS
#include <unistd.h>
long sysconf(int name);
DESCRIPTION
POSIX allows an application to test at compile or run time whether
certain options are supported, or what the value is of certain
configurable constants or limits.
At compile time this is done by including <unistd.h> and/or <limits.h>
and testing the value of certain macros.
At run time, one can ask for numerical values using the present
function sysconf(). One can ask for numerical values that may depend
on the filesystem a file is in using the calls fpathconf(3) and
pathconf(3). One can ask for string values using confstr(3).
The values obtained from these functions are system configuration
constants. They do not change during the lifetime of a process.
...<snip>...
OPEN_MAX - _SC_OPEN_MAX
The maximum number of files that a process can have open at any
time. Must not be less than _POSIX_OPEN_MAX (20).