Skip to content

capnslog: why check ppid = 1 for systemd? #38

@philips

Description

@philips

Current algorithm for journal detection:

  1. Check for ppid == 1 https://github.com/coreos/pkg/blob/master/capnslog/init.go#L41
  2. Check for an actual journal https://github.com/coreos/pkg/blob/master/capnslog/journald_formatter.go#L28

This is wrong for two reasons: 1. systemd isn't always pid 1 (user session) 2. it is code stutter having a heuristic and then a authoritative check after 3. even if systemd is pid, your parent might not be pid 1.

@barakmich Was there a reason for doing this check that I might be missing? Otherwise we should fix it up.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions