Skip to content

UseSystemd() does nothing when ProtectProc=invisible is set #125368

@mrek-msft

Description

@mrek-msft

Description

In comment on 88660 user complained that UseSystemd() does nothing when ProtectProc=invisible is set. It's likely because in that case systemd hides files which UseSystemd uses for detection if running on systemd based system or not. Since issues is different from originally reported (support non-sytemd × sometimes do not work at systemd), creating separate issue for tracking it for case we pick approach that do not solves them both at once.

Reproduction Steps

Run Microsoft.Extensions.Hosting based app with ProtectProc=invisible set in systemd service unit file

Expected behavior

Should behave like running under systemd

Actual behavior

UseSystemd does nothing

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions