是否可以在进程退出之前从 perl CGI 进行打印?
我有一个 perl CGI,它需要在进入一个通常需要几分钟的非常漫长的过程之前向浏览器报告一些信息。
目前我打印了该消息,但直到整个进程退出后它才显示。
所以,我的问题是:
是否有可能将消息返回到浏览器中流,如果不是,
我如何生成一个单独的进程来处理冗长的位,以便我可以退出初始进程,从而让用户获得他们需要的反馈。
当漫长的过程完成时,不需要通知用户,因此,只要服务器继续运行,我就可以退出。
I have a perl CGI that needs to report some information back to the browser before it goes into a really lengthy process that frequently takes several minutes.
Currently I print the message but it doesn't show up till the entire process exits.
So, my question is:
Is it possible to get the message back to browser mid stream and if not
how do I spawn off a separate process to handle the lengthy bit, so that I can exit out of the initial process and thus have the user get the feedback they need.
The user doesn't need to be notified when the lengthy process is completed, so, I'm fine with quitting as long as the server keeps chugging at it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)