On Mon, Mar 31, 2014 at 11:10 AM, Imre Oolberg <i...@auul.pri.ee> wrote: ... > But i wonder how i could ask the system how much are the so to say > ulimits of the running unbound process, e.g. number of open files?
There's currently no way to do that from a non-privileged process and no canned way to do it from a privileged process. A privileged process could do it by using kvm_getprocs() to get the kinfo_proc for the target process, then kvm_read() the struct plimit for the process from the address found in kinfo->p_limit. Philip Guenther