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

Avoid pidfile creation race #18

Merged
merged 2 commits into from
May 18, 2017

Commits on Nov 11, 2016

  1. Add support for getFdName() on Darwin

    Add support for getFdName() on Darwin using fcntl(F_GETPATH), as Darwin does not have /proc
    
    Signed-off-by: Alex Bligh <[email protected]>
    abligh committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    700e157 View commit details
    Browse the repository at this point in the history
  2. Avoid race on pidfile creation

    Avoid a race on pidfile creation by creating the pidfile before the JSON is processed.
    Prior to this patch, the pidfile was created only after the JSON had been processed.
    This creates a race if the initiating process assumes the daemon is running if it
    the call to start the daemon has returned. This corrects the problem by not consuming
    the JSON (and thus preventing the parent from quitting) until the lock file has been
    created.
    
    Signed-off-by: Alex Bligh <[email protected]>
    abligh committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    b0da556 View commit details
    Browse the repository at this point in the history