【发布时间】:2020-03-27 08:08:33
【问题描述】:
我正在运行一个 Python 脚本,该脚本多次启动 Fortran 可执行文件(使用 os.system('./executable params.ini)。
不幸的是,我执行了 CTRL+Z 来停止 python 脚本,但似乎我在执行 Fortran 可执行文件期间停止了它。
现在,无法重新启动 Python 脚本。我试过了。 :
fg %1
和
bg %1
和
kill -CONT pid_of_executable
但是什么都没发生……
那么,有没有办法重新启动 python 脚本?我很沮丧......如果有人能救我的命......(我在开玩笑)
更新 1: 一旦 Python 脚本被 CTRL+Z 停止,pa aux | grep compute
给出:
user1 38258 0.0 0.0 6121988 10324 s003 S 3:26PM 0:00.99 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py
user1 33564 0.0 0.0 6010372 16472 s012 S+ 1:34PM 0:01.44 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py
user1 96299 0.0 0.0 6509060 12668 s004 S+ 6:06PM 0:01.77 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py
【问题讨论】:
-
是的,我可以看到它(带有 python 脚本名称的
compute子字符串):ps aux | grep compute给出: -
user1 38258 0.0 0.0 6121988 10324 s003 S 3:26PM 0:00.99 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py user1 33564 0.0 0.0 6010372 16472 s012 S+ 1:34PM 0:01.44 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py -
user1 96299 0.0 0.0 6509060 12668 s004 S+ 6:06PM 0:01.77 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python compute_Cl_variable_step_160_between_1e-8_and_1_values_Only_Omega_m_der_to_choose.py -
@oguzismail 你认为它对我来说已经死了吗?