diff --git a/frameworks/libhilog/hilog_printf.cpp b/frameworks/libhilog/hilog_printf.cpp index cc79daa1cf51bb237c2754ad8c67124f053e68f5..61b47ea481c28655abb80668701e6e0738450839 100644 --- a/frameworks/libhilog/hilog_printf.cpp +++ b/frameworks/libhilog/hilog_printf.cpp @@ -305,7 +305,7 @@ int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int header.level = level; #ifndef __RECV_MSG_WITH_UCRED_ #ifndef __WINDOWS__ - header.pid = getpid(); + header.pid = getprocpid(); #else header.pid = static_cast(GetCurrentProcessId()); #endif @@ -317,7 +317,7 @@ int HiLogPrintArgs(const LogType type, const LogLevel level, const unsigned int pthread_threadid_np(NULL, &tid); header.tid = static_cast(tid); #else - header.tid = static_cast(syscall(SYS_gettid)); + header.tid = static_cast(getproctid()); #endif header.domain = domain;