1) Nagios starts
2) Nagios-api starts, checks for existance of nagios.cmd
3) Nagios is Stopped
4) Nagios-api receives an api call, and opens nagios.cmd: At this point nagios-api creates the file.
5) Nagios is Started - Sees a file where he wants his pipe: Hilarity ensues.
I found a race condition in send_nagios_command.
1) Nagios starts 2) Nagios-api starts, checks for existance of nagios.cmd 3) Nagios is Stopped 4) Nagios-api receives an api call, and opens nagios.cmd: At this point nagios-api creates the file. 5) Nagios is Started - Sees a file where he wants his pipe: Hilarity ensues.