Possible I/O sync issue with Ruby script under nohup?

跟風遠走 提交于 2019-12-06 06:46:35

This due to the fact when your STDOUT is not connected to tty, but to a file, block-sized buffering is used, if it is connected to tty, line-based buffering is used.

If you ran your command without NOHUP, the output (both stdout and stderr) would still be connected to the same tty, and it would be line-buffered. The default behavior of NOHUP is to write to nohup.out file. Since buffers are generally a lot bigger than lines, it will take much longer to "display" the results.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!