如何在程序部分中使用supervisord的环境选项?

supervisord documentation表示

No shell is executed by supervisord when it runs a subprocess,so
environment variables such as USER,PATH,HOME,SHELL,LOGNAME,etc.
are not changed from their defaults or otherwise reassigned. (…)
If you need to set environment variables for a
particular program that might otherwise be set by a shell invocation
for a particular user,you must do it explicitly within the
environment= program config option.

包含一个示例,我将其复制到/etc/supervisor/conf.d/apache2.conf中:

[program:apache2]
command=/home/chrism/bin/httpd -c "ErrorLog /dev/stdout" -DFOREGROUND
user=chrism
environment=HOME=/home/chrism,USER=chrism

然而,

# supervisorctl reread
ERROR: CANT_REREAD: Unexpected end of key/value pairs

删除apache2配置的“环境”行不会导致重新读取的解析错误.这里有点什么?我在Debian Squeeze上使用supervisor 3.0a8-1并注意到主线主管是3.0a10;自3.0a8以来我找不到环境参考

解决方法

http://supervisord.org/configuration.html#program-x-section-settings

说“包含非字母数字字符的值应放在引号中”

相关文章

linux常用进程通信方式包括管道(pipe)、有名管道(FIFO)、...
Linux性能观测工具按类别可分为系统级别和进程级别,系统级别...
本文详细介绍了curl命令基础和高级用法,包括跳过https的证书...
本文包含作者工作中常用到的一些命令,用于诊断网络、磁盘占满...
linux的平均负载表示运行态和就绪态及不可中断状态(正在io)的...
CPU上下文频繁切换会导致系统性能下降,切换分为进程切换、线...