Skip to content

Commit

Permalink
QUIC QLOG: Retrieve PID correctly on Windows
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from #23517)
  • Loading branch information
hlandau committed Feb 9, 2024
1 parent 1260d0f commit 1548e3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ssl/quic/qlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,12 @@ static void qlog_event_seq_header(QLOG *qlog)
ossl_json_key(&qlog->json, "process_id");
ossl_json_u64(&qlog->json, qlog->info.override_process_id);
} else {
#if defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_WINDOWS)
#if defined(OPENSSL_SYS_UNIX)
ossl_json_key(&qlog->json, "process_id");
ossl_json_u64(&qlog->json, (uint64_t)getpid());
#elif defined(OPENSSL_SYS_WINDOWS)
ossl_json_key(&qlog->json, "process_id");
ossl_json_u64(&qlog->json, (uint64_t)GetCurrentProcessId());
#endif
}
} /* system_info */
Expand Down

0 comments on commit 1548e3c

Please sign in to comment.