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

Global safe tempdir #167

Merged
merged 2 commits into from
Aug 7, 2019
Merged

Global safe tempdir #167

merged 2 commits into from
Aug 7, 2019

Conversation

wilhelmy
Copy link
Collaborator

@wilhelmy wilhelmy commented Aug 6, 2019

Adds a safe temporary directory created using mkdtemp(3), makes it accessible to Lua, uses it to put the mod_notionflux socket inside and deletes everything on exit.

This means the socket is removed on exit.

Also introduce changes proposed in #16 to make socket handling more stable on
BSD and possibly other *NIX (closes #16).
@wilhelmy
Copy link
Collaborator Author

wilhelmy commented Aug 6, 2019

Travis bugged out on me, but I guess this is good to go.

@wilhelmy wilhelmy requested a review from raboof August 6, 2019 17:22
@knixeur
Copy link
Collaborator

knixeur commented Aug 6, 2019

Error on Travis seem related to some temporary problem with their apt cache, lgtm

/*
* notion/ioncore/tempdir.c
*
* Copyright (c) 2019 Moritz Wilhelmy
Copy link
Owner

Choose a reason for hiding this comment

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

I kinda prefer Copyright (c) 2019 the Notion team, but this is fine I guess.


if(strlen(listenfile)>SOCK_MAX){
warn("Too long socket path");
if(strlen(listenfile)>sizeof(addr.sun_path)-1){
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@raboof
Copy link
Owner

raboof commented Aug 7, 2019

indeed a travis rebuild did the trick

@raboof raboof merged commit 02cafe7 into master Aug 7, 2019
@raboof raboof deleted the global-safe-tempdir branch August 7, 2019 07:03
@raboof raboof added the notionflux run-time Lua interface label Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notionflux run-time Lua interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants