Remove path in angel_proc logging
This commit is contained in:
parent
766fcd4bfc
commit
e02d2efea1
|
@ -69,8 +69,9 @@ LI_API gsize li_dirent_buf_size(DIR * dirp);
|
|||
|
||||
/* error log helper functions */
|
||||
#define LI_REMOVE_PATH_FROM_FILE 1
|
||||
#if LI_REMOVE_PATH_FROM_FILE
|
||||
LI_API const char *li_remove_path(const char *path);
|
||||
|
||||
#if LI_REMOVE_PATH_FROM_FILE
|
||||
#define LI_REMOVE_PATH(file) li_remove_path(file)
|
||||
#else
|
||||
#define LI_REMOVE_PATH(file) file
|
||||
|
|
|
@ -145,7 +145,7 @@ liProc* li_proc_new(liServer *srv, gchar **args, gchar **env, uid_t uid, gid_t g
|
|||
proc->srv = srv;
|
||||
proc->child_pid = -1;
|
||||
proc->epipe = li_error_pipe_new(srv, proc_epipe_cb, proc);
|
||||
proc->appname = g_strdup(args[0]);
|
||||
proc->appname = g_strdup(li_remove_path(args[0]));
|
||||
|
||||
switch (pid = fork()) {
|
||||
case 0:
|
||||
|
|
|
@ -725,7 +725,6 @@ gsize li_dirent_buf_size(DIR * dirp) {
|
|||
return (name_end > sizeof(struct dirent) ? name_end : sizeof(struct dirent));
|
||||
}
|
||||
|
||||
#if LI_REMOVE_PATH_FROM_FILE
|
||||
const char *li_remove_path(const char *path) {
|
||||
char *p = strrchr(path, DIR_SEPERATOR);
|
||||
if (NULL != p && *(p) != '\0') {
|
||||
|
@ -733,7 +732,6 @@ const char *li_remove_path(const char *path) {
|
|||
}
|
||||
return path;
|
||||
}
|
||||
#endif
|
||||
|
||||
GQuark li_sys_error_quark() {
|
||||
return g_quark_from_static_string("li-sys-error-quark");
|
||||
|
|
Loading…
Reference in New Issue