proj: Add pid to msg()
This commit is contained in:
@@ -602,7 +602,7 @@ static void msg(const char *fmt, ...) {
|
||||
|
||||
struct timespec spec;
|
||||
clock_gettime(CLOCK_REALTIME, &spec);
|
||||
size_t offset = snprintf(buf, sizeof(buf), "%li.%09li ", spec.tv_sec, spec.tv_nsec);
|
||||
size_t offset = snprintf(buf, sizeof(buf), "%li.%09li %i ", spec.tv_sec, spec.tv_nsec, getpid());
|
||||
for (char ch, state = 0; (ch = *fmt) != 0 && offset < sizeof(buf); fmt++) {
|
||||
if (state == '%') {
|
||||
if (ch == '%') {
|
||||
|
||||
Reference in New Issue
Block a user