Perl升级后出现奇怪的错误:无法刷新标准输出 [英] Weird error after Perl upgrade: Unable to flush stdout
问题描述
升级到Perl 5.24.4后,我们在日志中反复出现此错误(不指出文件名和行号):
After upgrading to Perl 5.24.4 we repeatedly get this error in logs (without pointing the filename and line number):
无法刷新标准输出:管道损坏
Unable to flush stdout: Broken pipe
我们不知道导致此错误的原因.
We have no idea what causes this error.
有什么建议可以帮助您理解错误的原因吗?
Is there any advice how to understand the cause of the error?
推荐答案
错误来自
此行是 This line is part of 作为全局关闭过程的一部分,将清除所有仍打开的文件句柄(即,写出所有缓冲的输出).上面的评论说: As part of the global shutdown procedure, all still open filehandles are flushed (i.e. all buffered output is written out). The comment above says: 该错误消息未在 The error message is not listed in 这篇关于Perl升级后出现奇怪的错误:无法刷新标准输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!perl_destruct
的一部分,该文件将在以下位置关闭perl解释器程序结束.perl_destruct
, which is called to shut down the perl interpreter at the end of the program. /* Need to flush since END blocks can produce output */
/* flush stdout separately, since we can identify it */
perldoc perldiag
中列出,这可以说是一个文档错误.它可能被忽略了,因为它不是真正的warn
或die
调用,实际上只是print STDERR $message
.它与文件名或行号无关,因为它仅在程序停止运行后发生(即在调用exit
之后,或者因为执行不在主脚本的末尾).perldoc perldiag
, which is arguably a documentation bug. It was probably overlooked because it's not a real warn
or die
call, it's effectively just print STDERR $message
. It's not associated with a file name or line number because it only happens after your program stops running (i.e. after a call to exit
or because execution fell off the end of the main script).