/usr/bin/env python
#encoding:utf8
import sys,time,os,platform
#定义我自己要在后台运行的程序
def getio():
while..._exit(0)
except OSError, error:
print 'fork #1 failed: %d (%s)' % (error.errno, error.strerror..._exit(0)
except OSError, error:
print 'fork #2 failed: %d (%s)' % (error.errno, error.strerror..._exit(0)
# 重定向标准IO
sys.stdout.flush()
sys.stderr.flush()
si = file("/dev/null", '...os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# 在子进程中执行代码