File util_func.c¶
FileList > base > util_func.c
Go to the source code of this file
#include "config.h"#include <stdio.h>#include <string.h>#include <signal.h>#include <assert.h>#include <chrono>#include <time.h>#include <stdarg.h>#include <sys/timeb.h>#include <sys/time.h>#include "util_func.h"#include "porting.h"#include "error_code.h"#include "utility.h"#include "system_parameter.h"#include "environment_variable.h"#include "memory_wrapper.hpp"
Public Static Attributes¶
| Type | Name |
|---|---|
| SIG_HANDLER | user_interrupt_handler = [**NULL**](freelistheap_8h.md#define-null) |
| SIG_HANDLER | user_quit_handler = [**NULL**](freelistheap_8h.md#define-null) |
| char | util_Log_buffer |
| char * | util_Log_filename = [**NULL**](freelistheap_8h.md#define-null) |
| char | util_Log_filename_buf |
Public Functions¶
Public Static Functions¶
| Type | Name |
|---|---|
| FILE * | fopen_and_lock (const char * path) |
| void | system_interrupt_handler (int sig) |
| void | system_quit_handler (int sig) |
| void | util_get_seconds_and_rest_since_epoch (std::chrono::seconds & secs, Duration & rest) |
| FILE * | util_log_file_backup (FILE * fp, const char * path) |
| FILE * | util_log_file_fopen (const char * path) |
| int | util_log_header (char * buf, size_t buf_len) |
| int | util_log_write_internal (const char * msg, const char * prefix_str) |
Macros¶
| Type | Name |
|---|---|
| define | MAX_RETRY_COUNT 10 |
| define | UTIL_LOG_BUFFER_SIZE ([**UTIL\_LOG\_MAX\_MSG\_SIZE**](util__func_8c.md#define-util_log_max_msg_size) + [**UTIL\_LOG\_MAX\_HEADER\_LEN**](util__func_8c.md#define-util_log_max_header_len)) |
| define | UTIL_LOG_FILENAME "cubrid\_utility.log" |
| define | UTIL_LOG_MAX_HEADER_LEN (40) |
| define | UTIL_LOG_MAX_MSG_SIZE (1024) |
Public Static Attributes Documentation¶
variable user_interrupt_handler¶
variable user_quit_handler¶
variable util_Log_buffer¶
variable util_Log_filename¶
variable util_Log_filename_buf¶
Public Functions Documentation¶
function hashpjw¶
function util_arm_signal_handlers¶
function util_bsearch¶
int util_bsearch (
const void * key,
const void * base,
int n_elems,
unsigned int sizeof_elem,
int (*)( const void *, const void *) func_compare,
bool * out_found
)
function util_compare_filepath¶
function util_disarm_signal_handlers¶
function util_free_string_array¶
function util_get_second_and_ms_since_epoch¶
function util_get_seconds_and_rest_since_epoch¶
template<typename Duration>
void util_get_seconds_and_rest_since_epoch (
std::chrono::seconds & secs,
Duration & rest
)
function util_log_write_command¶
function util_log_write_errid¶
function util_log_write_errstr¶
function util_log_write_result¶
function util_log_write_warnstr¶
function util_shuffle_string_array¶
function util_split_string¶
function util_str_to_time_since_epoch¶
Public Static Functions Documentation¶
function fopen_and_lock¶
function system_interrupt_handler¶
function system_quit_handler¶
function util_get_seconds_and_rest_since_epoch¶
template<typename Duration>
static void util_get_seconds_and_rest_since_epoch (
std::chrono::seconds & secs,
Duration & rest
)
function util_log_file_backup¶
function util_log_file_fopen¶
function util_log_header¶
function util_log_write_internal¶
Macro Definition Documentation¶
define MAX_RETRY_COUNT¶
define UTIL_LOG_BUFFER_SIZE¶
define UTIL_LOG_FILENAME¶
define UTIL_LOG_MAX_HEADER_LEN¶
define UTIL_LOG_MAX_MSG_SIZE¶
The documentation for this class was generated from the following file cubrid/src/base/util_func.c