[Bug 12566] New: ash: read with -t 0 does not return failure if nothing is read after a successful first read

bugzilla at busybox.net bugzilla at busybox.net
Wed Feb 19 17:58:10 UTC 2020


https://bugs.busybox.net/show_bug.cgi?id=12566

            Bug ID: 12566
           Summary: ash: read with -t 0 does not return failure if nothing
                    is read after a successful first read
           Product: Busybox
           Version: 1.31.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: busybox at ukku.uk
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

echo "a" | if read -t 0 a ; then echo $a; a=cleared; if read -t 0 a; then echo
$a; fi; fi

outputs

blah
cleared

I'm a little confused by this. Would expect the second read to return failure,
but it does not. Indeed, any subsequent reads on the same pipe return true.

Can work around by using -t 0.001 but it seems a little odd.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list