-
Notifications
You must be signed in to change notification settings - Fork 0
These are some utility routines I developed to make it easier to write UNIX daemons.
License
cmccabe/cmccabe-daemon-utils
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
cmccabe-daemon-utils ============================================================================== These are some utility routines I developed to make it easier to write UNIX daemons. The stuff in the util/ directory can be linked into anything, including libraries. Stuff in the core/ directory makes use of globals, so it should only be linked into daemons, but not into libraries. The jorm/ directory contains some macros that can be used to automatically serialize and deserialize JSON data to C structures. core/fast_log: a fast log intended to be used to "always-on" debugging. Log messages go to a circular buffer. Normally, you would create one fast_log buffer per thread. Log messages can be dumped to a file in the signal handler. core/glitch_log: a slow log which is intended to be used to log serious warning messages and errors. core/pid_file: routines for managing a pid file. core/signal: routines for managing signals. This integrates with fast_log and glitch_log. util/compiler.h: macros for making use of compiler-specific features util/run_cmd: utilities for running external commands. util/safe_io: utility functions for writing to a raw file descriptor while properly handling EINTR. util/str_to_int: a stricter version of atoi and atoll. util/string: some handy string manipulation routines. util/tempfile: some routines for manipulating temporary directories. json: as mentioned before, this directory contains code used to serialize and deserialize JSON data to C structures. These structures are defined in .jorm files, and the C code to handle them is generated by #include directives. See jorm_unit for an example of how to use this. I am releasing this code under the Apache 2.0 license, in hopes that it will be useful to you. See LICENSE.txt for details. Have fun. Colin Patrick McCabe
About
These are some utility routines I developed to make it easier to write UNIX daemons.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published