On Mon, 2014-03-31 at 13:16 -0700, Philip Guenther wrote: > 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.
Thank you for quick and clear reply. (After reading my own mail i must say i said confusing things in the line of 'how to query running process' and 'how i could ask system', what i meant actually was just to get to know what are the limits in effect.) Generally i would feel more comfortable if i could check if limits that are set actually took effect. So may i ask if there are any plans to introduce this? And i am sorry being just OpenBSD user i most probably dont realize what work it takes to implement this. Best regards, Imre