|
NAMEkutil_openlog —
configure log message sink
LIBRARYlibrary “libkcgi”SYNOPSIS#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
int
DESCRIPTIONThekutil_openlog () function configures output for the
kutil_log(3)
family of functions. By default, these functions log to
stderr and inherit the initial output buffering
behaviour (see
setvbuf(3)).
If file is not CGI scripts invoking long-running child processes via fork(2) should use this function with a valid file as the web server might wait for all file descriptors to close before closing the request connection. RETURN VALUESThekutil_openlog () function returns zero on failure
(system error) and non-zero on success. If
kutil_openlog () fails to re-open
stderr, the output stream may no longer be operable: the
caller should exit.
AUTHORSThekutil_openlog () function was written by
Kristaps Dzonsons
<kristaps@bsd.lv>.
CAVEATSIn most situations, file is configured in the default log directory, which is not writable to the CGI process. Thus, file must be pre-created and be writable to the CGI process. Otherwise,kutil_openlog () will fail to
create the file and exit with failure.
Visit the GSP FreeBSD Man Page Interface. |