File: systemd_linux.go

package info (click to toggle)
witr 0.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 736 kB
  • sloc: sh: 79; makefile: 10
file content (17 lines) | stat: -rw-r--r-- 322 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//go:build linux

package source

import "github.com/pranshuparmar/witr/pkg/model"

func detectSystemd(ancestry []model.Process) *model.Source {
	for _, p := range ancestry {
		if p.PID == 1 && p.Command == "systemd" {
			return &model.Source{
				Type: model.SourceSystemd,
				Name: "systemd",
			}
		}
	}
	return nil
}