exfds.c sample program

The exfds.c sample program demonstrates how an Open Server application can service external file descriptors without blocking the entire Open Server process. This program performs a number of tasks:

The two service threads implement a simple command/response protocol by writing messages on the UNIX pipes. srv_poll is used to allow Open Server to reschedule the service thread while waiting for a message. Information is written to srv.log to monitor the progress. The Open Server performs the command/response protocol the number of times specified in the source code and then queues a SRV_STOP event.

This sample does not require a client application. Check the srv.log file for messages to determine if it has started correctly.