Skip to content

status checking doesn't work properly under OS X 10.12 #53

@vegertar

Description

@vegertar

Hello, I'm working under OS X 10.12.

When I installed a daemon with a non-executable name like "port 8082", daemon would create a file named /Library/LaunchDaemons/port_8082.plist with incorrect binary path.

I glanced the codes, it might be failed while calling exec.LookPath so which used filepath.Abs(os.Args[0]) instead. Even though a little bit of extra time, it's still easy to fix by using absolute path from command line. But, I found a issue, when I used status to check, it was returned Service is running..., that was incredible. The output of sudo launchctl list port_8082 is shown as below, I hope I've provided all necessary details, if not, please feel free to point out it.

BTW, my command's name is example which is located in GOPATH, PATH as well.

{
	"StandardOutPath" = "/usr/local/var/log/port_8082.log";
	"LimitLoadToSessionType" = "System";
	"StandardErrorPath" = "/usr/local/var/log/port_8082.err";
	"Label" = "port_8082";
	"TimeOut" = 30;
	"OnDemand" = false;
	"LastExitStatus" = 19968;
	"Program" = "/Users/vegertar/PycharmProjects/cdntoolkit/ctk/collect/example";
	"ProgramArguments" = (
		"/Users/vegertar/PycharmProjects/cdntoolkit/ctk/collect/example";
		"run";
		"http";
		":8082";
	);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions