doutongwei4380 2009-10-23 09:37
浏览 56

自动构建和STDIN

I am writing an automated build system to do nightly builds of our code.

Under normal conditions every thing works fine, but some of the processes in the build can require user input, if a developer commits a change that opens up one of these the automated builds grind to a halt.

Does any one know of a way of causing reads from STDIN to fail so any process that tries this will (hopefully) fail with an error? Right now I only need a solution for Linux (Ubuntu) but The system also has to run on Windows.

FYI: The automated build system is written in PHP, and in the case where this is (currently) a problem it is using buildroot to do the compilation.

  • 写回答

1条回答

  • douxing8855 2009-10-23 09:47
    关注

    Read from /dev/null. It will always return EOF. This is achieved in different ways depending on how your build system is setup. A command line app can use < /dev/null, of course.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥15 帮我写一个c++工程