Skip to content

Instantly share code, notes, and snippets.

View kelson-martins's full-sized avatar

Kelson Martins kelson-martins

View GitHub Profile
@kelson-martins
kelson-martins / python_pid.py
Last active October 2, 2017 10:32
Using Python pid to controll processes
#!/usr/bin/python
import os
import time
import signal
# Get process PID
PID = str(os.getpid())
PIDFILE = "RUNNING.pid"