2015-03-16 20:19 GMT+03:00 Alexander Guy <[email protected]>: > Hi Vasiliy, > Are you sure about that? I'm pretty sure setrlimit(RLIMIT_NOFILE, ...) > applies to the calling process, just like prlimit(0, RLIMIT_NOFILE, ...) > would.
Ok, i'm re-read man page and fix my code =) Thanks. > >> 2015-03-16 19:30 GMT+03:00 Vasiliy Tolstov <[email protected]>: >> > Signed-off-by: Vasiliy Tolstov <[email protected]> >> > --- >> > sheep/sheep.c | 63 >> > +++++++++++++++++++++++++++++++++++++++-------------------- >> > 1 file changed, 42 insertions(+), 21 deletions(-) >> > >> > diff --git a/sheep/sheep.c b/sheep/sheep.c >> > index a1028a2..13cc927 100644 >> > --- a/sheep/sheep.c >> > +++ b/sheep/sheep.c >> > @@ -561,26 +561,47 @@ static int create_work_queues(void) >> > > [cut] >> > + len = asprintf(&buf, "%lu", new.rlim_max); >> > + if (len > 0) { >> > + fd = open("/proc/sys/fs/nr_open", O_WRONLY); > > The distribution and system administrator already have control over this by > sysctl. > I don't think sheepdog should be modifying the kernel's limits. It's too > much magic. Yes, i think so. -- Vasiliy Tolstov, e-mail: [email protected] jabber: [email protected] -- sheepdog mailing list [email protected] https://lists.wpkg.org/mailman/listinfo/sheepdog
