Hi all, a forum post made me (again) aware of functionality missing in rsyslog:
http://kb.monitorware.com/problem-to-migrate-from-syslog-ng-to-rsyslog-t8982. html That is the execution of a program which receives all log messages passed in via stdin. I have now done a first, rough, implementation of "omprog" which shall provide this feature. I would appreciate if some could quickly review the code, especially lines 97 to 135, where I clean up after fork and before I exec the program. The code can be found here: http://git.adiscon.com/?p=rsyslog.git;a=blob;f=plugins/omprog/omprog.c;h=2a07 8a6d862c2230a8caa9a489e08a7b5ea4cb29;hb=refs/heads/omprog#l97 There are three questions that I have: 1. is the method used sufficiently secure? 2. is there a better way to close open file handles 3. am I resetting the sigaction() correctly? Especially #3 puzzles me, because I can not use sigterm to cancel a child (via a different bash). Also, waitpid() always returns -1 and tells me "there are no children". So I am under the impression I am doing something wrong. As I also have limited experience in that area of executing external programs, I'd appreciate advice from those in the know. Feel free to pass this along, if you are able to motivate someone else on this topic ;) Thanks, Rainer _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

