Commit d3669436 authored by Markus's avatar Markus

missed the contidtion :(

parent c17c7f78
......@@ -47,15 +47,15 @@ if __name__ == '__main__':
parser.add_argument("-i","--interval",type=int,help="Interval for\
update default=30",default=30)
args = parser.parse_args()
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError:
sys.stderr.write("fork failed")
sys.exit(1)
if args.daemonize == True :
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError:
sys.stderr.write("fork failed")
sys.exit(1)
while True :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment