Python won't exit when called with absolute path from cron or subshell

我的梦境 提交于 2019-11-29 12:08:55

Ok, got it figured out. Thanks for the help.

I ran an strace and found that it was hanging on the following:

socket(PF_FILE, SOCK_STREAM, 0)         = 4
connect(4, {sa_family=AF_FILE, path="/var/run/abrt/abrt.socket"}, 27^C
<unfinished ...>

That led to Bugzilla which indicated that SELinux was the problem. I had already changed SELinux to permissive mode (I screwed it up moving /var), but had not restarted abrtd.

Restarting the abrtd service resolved the problem.

user3869055

Instead of:

/usr/bin/python /var/home/wotstats/test/test.py

use:

cd /var/home/wotstats/test/
/usr/bin/python test.py<br/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!