hongen

Created: 2012-03-26 17:54
Updated: 2018-03-13 10:15
License: mit
c++

README.md

hongen

hongen is a simple watchdog for Windows.

Usage:

$ hongen <command-line>

hongen will start the command specified in the command line and will keep the child process running forever. The nice thing about it is that it will create a Job Object for the child process and all its decendents. When the child process exits (crashes), hongen will close the job object (subsequently causing all the decendents to be killed as well) and then respawn the child.

We use hongen as part of anode as the root of our worker roles in Azure, which spawn multiple child processes.

Examples

$ hongen %ProgramFiles(x86)%\nodejs\node.exe c:\server.js

Will spawn the node program c:\server.js and will keep it alive forever. Note that you can use environment variable expansions (e.g. %ProgramFiles(x86)% resolves to where the 32-bit program files are).

$ hongen %COMSPEC% /c c:\some\batch.cmd

Note that you should use %COMSPEC% /C (resolves to where cmd.exe is) if you want to run a batch file.

License

MIT

Author

Elad Ben-Israel

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more