<commit_before>// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by
// license that can be found in the LICENSE file.

// Package daemon linux version
package daemon

import (
	"os"
)

// Get the daemon properly
func newDaemon(name, description string, dependencies []string) (Daemon, error) {
	if _, err := os.Stat("/sbin/initctl"); err == nil {
		return &upstartRecord{name, description, dependencies}, nil
	}
	if _, err := os.Stat("/run/systemd/system"); err == nil {
		return &systemDRecord{name, description, dependencies}, nil
	}
	return &systemVRecord{name, description, dependencies}, nil
}

// Get executable path
func execPath() (string, error) {
	return os.Readlink("/proc/self/exe")
}<commit_msg>fix check linux subsystem priority. A newer subsystem must be checked first<commit_after>// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by
// license that can be found in the LICENSE file.

// Package daemon linux version
package daemon

import (
	"os"
)

// Get the daemon properly
func newDaemon(name, description string, dependencies []string) (Daemon, error) {
	// newer subsystem must be checked first
	if _, err := os.Stat("/run/systemd/system"); err == nil {
		return &systemDRecord{name, description, dependencies}, nil
	}
	if _, err := os.Stat("/sbin/initctl"); err == nil {
		return &upstartRecord{name, description, dependencies}, nil
	}
	return &systemVRecord{name, description, dependencies}, nil
}

// Get executable path
func execPath() (string, error) {
	return os.Readlink("/proc/self/exe")
}
{'fraction_non_alphanumeric': 0.12251243781094527, 'fraction_numerical': 0.004975124378109453, 'mean_word_length': 4.275409836065574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4843753', 'n_tokens_mistral': 486, 'n_tokens_neox': 464, 'n_words': 177}