[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTil6JWOMEAm6JyNNtlqGx6ofsgUjg2zmbR8IrRK4@mail.gmail.com>
Date: Wed, 16 Jun 2010 13:09:10 -0700
From: "Leonidas ." <leonidas137@...il.com>
To: linux-kernel <linux-kernel@...r.kernel.org>
Subject: Reserving file descriptors per applications
Hi,
Here is the scenario:
I have a shared lib which is written to profile some web servers, the
lib collects some statistics from runs and logs it to files or over
sockets.
Some of these servers close all file descriptors under some
conditions, I am not sure whether this is the right programming
proactice, but they do it.
Due to which my logging fails, I have a way here to check the validity
of file descriptor every time before I write, but this cases latency
since we are doing
two system calls instead of one.
Is there any way using which, I can tell kernel to reserver some fds
for my lib so that these fds are immune to being closed by anyone
other than my lib itself?
Any setrlimit() magic using which I can just reserve the fd and then
change back the limits and application just does not see my fds.
-Leo.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists