On Fri, Apr 29, 2011 at 6:46 PM, richard -rw- weinberger
<richard.weinber...@gmail.com> wrote:
> I fear you cannot use /dev/null (or any other non-tty file) as stdin. :-(
> UML uses poll() to detect whether input is available from stdin.
> As you can always read from /dev/null poll() doesn't block and
> UML gets flooded with interrupts.
>
> Do you really need stdin set to /dev/null?
> Can't you use a tool like screen to detach UML from your terminal?

Hmmmm... no :-(   The purpose of this exercise is to launch a UML
machine as a non-interactive job in a batch system, and this means it
will run with stdin = /dev/null (or a file, which has the same
`poll()` behavior).

But I can still redirect stdin from a named FIFO and attach a "silent"
process to it:

  mkfifo fake.stdin
  (sleep 365d > fake.stdin) &
  linux ... con=fd:0,fd:1 < fake.stdin

This apparently works; I wonder whether there is a simpler/better
solution.

Thanks for your help!

Riccardo

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to