Prev: How to printk/sprintf uint64_t on Sparc without format and argument types mismatch
Next: Fwd: [2.6.34] INFO: task rsync:20019 blocked for more than 120 seconds.
From: Leonidas . on 16 Jun 2010 16:10 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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |