Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions