in main/pid.go [26:36]
func SaveCurrentPidAndStartTime(path string) error {
pid := os.Getpid()
pidString := fmt.Sprintf("%d", pid)
startTime, err := GetProcessStartTime(pid)
if err != nil {
return errors.Wrap(err, "failed to execute bash ps command")
}
b := []byte(fmt.Sprintf("%s\t%s", pidString, startTime))
return errors.Wrap(ioutil.WriteFile(path, b, chmod), "extName.pid: failed to write")
}