Daniel Hilst Selli
2014-10-16 19:50:04 UTC
I'm writing a new application and would be nice to have a pseudo file showing its status, just the way that procfs does with kernel.
I'm looking for sugestions, I want to `cat' files contents and have something similar to /proc/meminfo
First I think using named pipes, but, AFAIK, pipes would retain data writed until someone read it, what I thought is a kind of read
hook that only show data when asked for. Here are a few requisites,
- Don't retain data
- Don't generate disk I/O
- Vanish when application stops
- Work with a simple cat or something similar..
With that in mind I think about using unix domain sockets.. it seems to fit all requisites, for
the fourth requisite I could use netcat, that is almost cat,
Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I'm looking for sugestions, I want to `cat' files contents and have something similar to /proc/meminfo
First I think using named pipes, but, AFAIK, pipes would retain data writed until someone read it, what I thought is a kind of read
hook that only show data when asked for. Here are a few requisites,
- Don't retain data
- Don't generate disk I/O
- Vanish when application stops
- Work with a simple cat or something similar..
With that in mind I think about using unix domain sockets.. it seems to fit all requisites, for
the fourth requisite I could use netcat, that is almost cat,
Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html