In order to make ESM the easiest possible program to use I'd like all plugin writers to please follow these conventions when writing your plugins.
All plugins should be install in esmdir/plugins esmdir should default to /usr/local/esm and should be user changable in the Makefile.
Please honor SIGHUP! And please cleanup after yourself. This includes stopping all proccesses created and deleteing all temp files. esmd can't do this for you. But you can. :)
For security reasons all temp files should be created with the permissions 600.
Any plugin should work perfect when both stdin and stdout are FIFOs. To test for this make two FIFO's with mkfifo. Then redirect stdin and stdout to the FIFOs. For instance someplugin < stdin_fifo > stdout_fifo You may need to do some fflush(NULL)'s in a C program to make things work right.
ESM is designed to warn you if anything goes wrong. But if your plugins fail in the face of errors what's the use?
You should write your plugins to that if anything isn't right, such as a failure to create a temp file, the user is warned. One good example would be the included ESMSysLog dmonitor. In older versions if it couldn't open the FIFO's it used to communicate with syslogd it would just ignore the error and continue. In this version it will loudly complain.
To be continued... :)
Index