python 启动新进程执行脚本

 

import subprocess
p_restart=subprocess.Popen(['/bin/sh','/etc/init.d/xxx_service','reboot'])

 

posted @ 2019-02-15 18:35  anobscureretreat  阅读(1876)  评论(0编辑  收藏  举报