lkml.org 
[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Need blocking /dev/null
    On Mon, 29 Oct 2001, Marko Rauhamaa wrote:

    > > > 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

    Highly elegant :)

    How bout just `mkfifo /tmp/blockme`
    and read on /tmp/blockme - just don't write to it!

    --
    TimC -- http://www.physics.usyd.edu.au/~tcon/

    > cat ~/.signature
    CPU time limit exceeded (core dumped)

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:12    [W:0.032 / U:0.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site