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

daemon: make activation optional #2627

Merged
merged 3 commits into from Jan 13, 2017

Conversation

chipaca
Copy link
Contributor

@chipaca chipaca commented Jan 13, 2017

offered as-is. Could also add spread tests, after the standup, or spread tests can be added in a later branch.

return nil, err
}

if err := os.Chmod(socketPath, 0666); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chipaca wondering, is this a bit racy? is there a best/better practice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is. And I was about to say no, but yes. Pushing.

Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@mvo5 mvo5 added this to the 2.21 milestone Jan 13, 2017
return nil, err
}

oldmask := unix.Umask(0111)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want runtime.LockOSThread and friend then

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chipaca thanks for the change to use umask, I think we need to protect it with (Un)LockOSThread though

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chipaca thank you

// the listeners, so check it before using it.
d.snapListener = listener
} else {
logger.Debugf("cannot get listener for %q: %v", dirs.SnapSocket, err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we turn this into a real error now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe leave that for after the cut?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you prefer, think is best

@mvo5 mvo5 merged commit b1fa946 into snapcore:master Jan 13, 2017
@chipaca chipaca deleted the socket-activation-optional branch January 20, 2017 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants