zorkian / nagios-api

A REST-like, JSON interface to Nagios
BSD 3-Clause "New" or "Revised" License
586 stars 173 forks source link

nagios.cmd gets created by nagios-api on nagios death #42

Closed andrewguy9 closed 10 years ago

andrewguy9 commented 10 years ago

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.

krutaw commented 8 years ago

This appears to still be an issue in the latest release. The lines submitted as part of pull request #43 don't appear to be part of the master branch.