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

Pid file #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Pid file #14

wants to merge 5 commits into from

Conversation

steven6282
Copy link
Collaborator

@steven6282 steven6282 commented Mar 8, 2018

Adds pid file (m_server.pid) locking. Shell script on pi will need to be updated with pid file location.

fixes #8

Anyone working on windows, fcntl library doesn't exist for windows. There is a file in .gitignore fcntl.py create it and add this to it for the code to get it to run on windows (without actually locking the pid file).

LOCK_EX = 0
LOCK_NB = 0

def fcntl(fd, op, arg=0):
    return 0
        
def ioctl(fd, op, arg=0, mutable_flag=True):
    if mutable_flag:
        return 0
    else:
        return ""
    
def flock(fd, op):
    return
        
def lockf(fd, operation, length=0, start=0, whence=0):
    return

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

Successfully merging this pull request may close these issues.

Daemonize Server
1 participant