I have used Unix domain datagram sockets for something very similar.   In
this case, a "monitor/server" program would create and open a Unix-domain
datagram socket and wait for messages from clients and process them.
 Clients would look for the existence of the socket as an indication to
write diagnostics to it.
See for example:
https://troydhanson.github.io/network/Unix_domain_sockets.html

Other IPC mechanisms include named pipes (FIFOs) and message queues.
http://docs.hfbk.net/beej.us/bgipc/output/print/bgipc_A4.pdf


On Sun, Nov 10, 2019 at 5:54 PM Pierre Fichaud <pr...@videotron.ca> wrote:

> I must continuously monitor ("read") a Unix file that contains
> diagnostics. I open the file, parse the records and possibly produce
> output. Once I've read all the records, I need to wait (or be blocked)
> until more data arrives. Then I process the new records. But I want to
> know when the writer has closed the file. Then I stop. Regards, Pierre.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to