Saturday 15 September 2012

linux - Sending data from one program to another non-blocking in C -



linux - Sending data from one program to another non-blocking in C -

i'm looking advice on best, simplest ipc method scenario:

two programs on same linux server. program 1 has variable integer in periodically updated different value, every 1 second. program 2 needs periodically grab value programme 1. needs latest value, not queued ones. neither reading or writing should block.

i've looked named pipes, message queues, unix domain sockets, , haven't been able find solution works yet. i've made work named pipe, blocks. when seek utilize nonblocking o_ndelay flag open pipe writing in programme 1, programme 2 gets "0"s when reading.

any general advice on how best go this?

sound job shared memory. set value in shared memory space.

c linux ipc nonblocking

No comments:

Post a Comment