Perl升级后出现奇怪的错误:无法刷新标准输出 [英] Weird error after Perl upgrade: Unable to flush stdout

查看:164
本文介绍了Perl升级后出现奇怪的错误:无法刷新标准输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到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?

推荐答案

错误来自

此行是 perl_destruct 的一部分,该文件将在以下位置关闭perl解释器程序结束.

This line is part of perl_destruct, which is called to shut down the perl interpreter at the end of the program.

作为全局关闭过程的一部分,将清除所有仍打开的文件句柄(即,写出所有缓冲的输出).上面的评论说:

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:

 /* Need to flush since END blocks can produce output */
 /* flush stdout separately, since we can identify it */

该错误消息未在 perldoc perldiag 中列出,这可以说是一个文档错误.它可能被忽略了,因为它不是真正的warndie调用,实际上只是print STDERR $message.它与文件名或行号无关,因为它仅在程序停止运行后发生(即在调用exit之后,或者因为执行不在主脚本的末尾).

The error message is not listed in 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).

这篇关于Perl升级后出现奇怪的错误:无法刷新标准输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆