Is it possible to create a virtual file in unix, whose contents are determined programmatically when the file is accessed, a bit like the files in /proc?
For example, I have a program that retrieves a particular setting by reading/catting a file. However, rather than store that setting directly in a plain text file, I want to be able to retrieve that setting from a database in the background and then pass that information to the program when it reads this virtual file. Is it possible to do so?
LD_PRELOAD
trick, but try the other methods first! – thrig Apr 12 '16 at 16:06