守护进程工具消息

守护进程工具消息

我配置了一项服务通过 daemontools 运行,但是在停止 svscan 时,我收到如下消息:

[root@tcp-handler ssc_ios]# /etc/init.d/svscan stop
Stopping djb services: svscan services  logging .
[root@tcp-handler ssc_ios]# Traceback (most recent call last):
File "/usr/lib64/python2.6/logging/__init__.py", line 800, in emit
self.flush()
File "/usr/lib64/python2.6/logging/__init__.py", line 762, in flush
self.stream.flush()
IOError: [Errno 32] Broken pipe

有人能告诉我如何解决这个问题吗?

答案1

您的某个进程是 Python 程序,它无法处理 stdout 消失的情况。但通常情况下,您不应停止 svscan。

您应该通过 与 daemontools 交互svcsvc -d /service/foo将停止该foo进程。 svc -d /service/foo/log将停止其日志记录。请参阅http://cr.yp.to/daemontools/svc.html以获得更多选项。

相关内容