How to run two task and open the same fd(file descriptor)
I want to run two or more task and open the same fd(file descriptor).
Because my program generator too many fd, it cause the performance very bad. "lsof" shows my tasks open more then 50000 files.
So I want to write a Daemon to manager my opened file. every file will be opened once . If the new task needs the file which is opened by other program, this new task just need the fd and without open again.
how can i do?
|