Don't be silent when going background and logger fails
Doing box.cfg{background=true, logger='/EACCESS.log'} resulted in a silent failure because initialization routine closed stderr first before initializing the logger. Changing stuff to absolutize pathes (logger, pid_file) to make it easier to troubleshoot errors. Things in say.c (logger guts) were changed to call exit instead of _exit on failure in order for the cleanup to be performed. Also adding a library for managing pid files under third_party/libutil_freebsd.
Showing
- src/CMakeLists.txt 8 additions, 2 deletionssrc/CMakeLists.txt
- src/main.cc 84 additions, 68 deletionssrc/main.cc
- src/say.c 18 additions, 16 deletionssrc/say.c
- third_party/libutil_freebsd/flopen.c 104 additions, 0 deletionsthird_party/libutil_freebsd/flopen.c
- third_party/libutil_freebsd/libutil.h 34 additions, 0 deletionsthird_party/libutil_freebsd/libutil.h
- third_party/libutil_freebsd/pidfile.c 290 additions, 0 deletionsthird_party/libutil_freebsd/pidfile.c
Loading
Please register or sign in to comment