Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message EOF #82

Open
zmhuanf opened this issue May 20, 2022 · 2 comments
Open

error message EOF #82

zmhuanf opened this issue May 20, 2022 · 2 comments

Comments

@zmhuanf
Copy link

zmhuanf commented May 20, 2022

ctx := &daemon.Context{}
d, err := ctx.Reborn()
if err != nil {
	// When I use exec.Command to execute the sh script and the sh script starts this program, the error prompts EOF
	return
}
if d != nil {
	return
}
defer ctx.Release()
@zmhuanf
Copy link
Author

zmhuanf commented May 20, 2022

I found the cause of the problem, all programs that use the daemon package use the same environment variable "MARK_NAME", which causes other programs to start mistakenly thinking that they are already started by the daemon

@deniszh
Copy link
Collaborator

deniszh commented May 20, 2022

Yes, looks like that's by design. But I do not see that this variable is exported, so, it will work if you spawn daemons from separate shells as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants