格式化
This commit is contained in:
parent
0b5815897d
commit
e03d112d7a
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define COMMAND_NOT_FOUND "/usr/lib/command-not-found"
|
||||
|
||||
#ifdef DEBUG //如果是debug模式,在本地目录生成log,方便debug
|
||||
#ifdef DEBUG // 如果是debug模式,在本地目录生成log,方便debug
|
||||
|
||||
#define LOG_FILE "./logs/execve.log"
|
||||
#define LOG_OUT_FILE "./logs/execve_out.log"
|
||||
|
|
@ -37,19 +37,18 @@
|
|||
|
||||
#define MAX_PATH_LEN 256
|
||||
|
||||
#define GET_LOG_FILE(c_pid, is_stdout) ({ \
|
||||
static char filename[MAX_PATH_LEN]; \
|
||||
snprintf(filename, MAX_PATH_LEN, "%s.%ld.%s", \
|
||||
LOG_OUT_FILE, \
|
||||
(long)c_pid, \
|
||||
(is_stdout) ? "stdout" : "stderr"); \
|
||||
filename; \
|
||||
})
|
||||
#define GET_LOG_FILE(c_pid, is_stdout) \
|
||||
({ \
|
||||
static char filename[MAX_PATH_LEN]; \
|
||||
snprintf(filename, MAX_PATH_LEN, "%s.%ld.%s", LOG_OUT_FILE, \
|
||||
(long)c_pid, (is_stdout) ? "stdout" : "stderr"); \
|
||||
filename; \
|
||||
})
|
||||
|
||||
#define ANSI_COLOR_RED "\033[31m"
|
||||
#define ANSI_COLOR_YELLOW "\033[33m"
|
||||
#define ANSI_COLOR_RESET "\033[0m"
|
||||
#define ANSI_COLOR_BLUE "\x1b[34m"
|
||||
#define ANSI_COLOR_BLUE "\x1b[34m"
|
||||
|
||||
#define SHM_KEY 0x78945
|
||||
#define SHM_SIZE 512 * 1024
|
||||
|
|
|
|||
Loading…
Reference in New Issue