Re: Need blocking /dev/null

From: Marko Rauhamaa (marko@pacujo.nu)
Date: Mon Oct 29 2001 - 22:52:21 EST


> > I noticed that I need a pseudodevice that opens normally but blocks all
> > reads (and writes). The only way out would be through a signal. Neither
>
> Try using a pipe

You're right. This is what I wanted to do:

   while true
   do
       ssh -R a:b:c host
       sleep 10
   done </dev/never >/dev/null

But I could do it like this:

   while true
   do
       sleep 100000
   done |
   while true
   do
       ssh -R a:b:c host
       sleep 10
   done >/dev/null

Thank you.

Marko

PS Are /dev/null and /dev/zero also redundant?

-- 
Marko Rauhamaa    mailto:marko@pacujo.nu     http://www.pacujo.nu/marko/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 31 2001 - 21:00:39 EST