Skip to content

Pid file#14

Open
steven6282 wants to merge 5 commits intomasterfrom
pid_file
Open

Pid file#14
steven6282 wants to merge 5 commits intomasterfrom
pid_file

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