[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    [Bug 12566] New: ash: read with -t 0 does not return failure if nothing is read after a successful f
From:       bugzilla () busybox ! net
Date:       2020-02-19 17:58:10
Message-ID: bug-12566-161 () https ! bugs ! busybox ! net/
[Download RAW message or body]

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@busybox.net
          Reporter: busybox@ukku.uk
                CC: busybox-cvs@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.
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic