Interesting. Probably because our previous for-loop takes input from regular file. The GNU implementation seems to treat only special files (block and char devices) differently as a "magnetic tape".
On Tue, Apr 20, 2021 at 5:33 PM Rob Landley <[email protected]> wrote: > On 4/20/21 3:23 AM, Yi-yo Chiang via Toybox wrote: > > Why do we need setsid in the new cpio testcase though? > > Because without it TEST_HOST=1 calls the gnu/dammit cpio which does: > > $ cpio -i < /dev/null > Found end of tape. To continue, type device/file name when ready. > > And then hangs waiting for you to hit enter after changing a nonexistent > reel-to-reel magnetic tape. The setsid breaks the association with > /dev/tty so > opening it fails and thus cpio returns immediately. > > (I.E. I have no idea how your previous for loop working around the > TRAILER!!! > behavior ever worked. I'm guessing you never ran that script from a > context with > a controlling tty?) > > Rob > -- Yi-yo Chiang Software Engineer [email protected]
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
