Detect systemd when inside a container. (#67288)
* Detect systemd when inside a container.
Modify IsSystemdService to function correctly
for containerised services.
Fix #67203
Adds conditional compilation to fall back
to Process.GetCurrentProcess().Id when
Environment.ProcessId is not available.
* Apply suggestions from code review
The minimum supported .NETCoreApp version in the repository is 6.0, so just using NETCOREAPP.
Co-authored-by: james <judilsteve>
Co-authored-by: NEric Erhardt <eric.erhardt@microsoft.com>
Showing
想要评论请 注册 或 登录